473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Difficulty listing vehicle records that do not have a related record of a specified type in another table

MLH
Suppose you have tblVehicleJobs with [VehicleJobID] keyfield.
And say there's another table used to keep records of inbound
letters you receive on each car. That table is named tblinLttrs
and has [InLttrID] as it's keyfield and has [VehicleJobID] field
which is used to link it to tblVehicleJobs.

Since many letters (of several categories) could be sent in over
time pertaining to a given vehicle, there is a hard-coded One To
Many relationship from tblVehicleJobs to tblinLttrs respectively.

Supposing I have 5 distinct InLttr types: A, B, C, D and E and
that I wish to list all vehicles in a query that do NOT have a Type
C inbound letter record in tblinLttrs. How might I do that?
Jun 27 '08 #1
2 1138
On May 1, 10:35*am, MLH <C...@NorthState.netwrote:
Suppose you have tblVehicleJobs with [VehicleJobID] keyfield.
And say there's another table used to keep records of inbound
letters you receive on each car. That table is named tblinLttrs
and has [InLttrID] as it's keyfield and has [tblVehicleJobs ] field
which is used to link it to tblVehicleJobs.

Since many letters (of several categories) could be sent in over
time pertaining to a given vehicle, there is a hard-coded One To
Many relationship from tblVehicleJobs to tblinLttrs respectively.

Supposing I have 5 distinct InLttr types: A, B, C, D and E and
that I wish to list all vehicles in a query that do NOT have a Type
C inbound letter record in tblinLttrs. How might I do that?
Create a query on tblinLttrs for all of the tblVehicleJobs with the
InLttr type of "C." Call that q_tblinLttrsC.

Create a query using tblVehicleJobs and q_tblinLttrsC with a Left
Join from tblVehicleJobs.tblVehicleJobs to tblinLttrs.tblVehicleJobs
(double click on the join in the query window and select "Show all
records from tblVehicleJobs..."). Make the criteria for
tblinLttrs.tblVehicleJobs Null.

Add additional fields to taste.

Tim Mills-Groninger
Jun 27 '08 #2
MLH
Thx, will have a lash at it.
Jun 27 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: tom | last post by:
I am new to SQL administration. >From a list of IDs that are the primary key in one table (i.e. Customer Table), I want to make changes in tables that use those IDs as a foreign key. ...
2
by: Colm O'Hagan | last post by:
Hi there, I having a problem with a database I'm setting up, I would be delighted if someone out there could help. The database I'm setting up is a task register datebase, it will be used to...
6
by: Robin S. | last post by:
**Eric and Salad - thank you both for the polite kick in the butt. I hope I've done a better job of explaining myself below. I am trying to produce a form to add products to a table (new...
2
by: noname | last post by:
Hello all, I use Access to keep track of approx. 80 vehicles. I have a table of vehicles with specs. I have another of service records linked to the vehicle table. Works great! I can expand each...
10
by: Thelma Lubkin | last post by:
My form/subform combination that allows user to display 'ColorSet' records, move to other records via a selector, to add,delete, and edit them, and to manage the related 'Color' records from the...
6
by: jimfortune | last post by:
In: http://groups.google.com/group/comp.databases.ms-access/msg/60d7faa790c65db1 james.ea...@gmail.com said: :Ok, I've answered the first half of my own question. From a MSDN :article, I...
3
by: John Fairhurst | last post by:
Hi, The following code should select the specified number of records randomly from the database <% .... query = "SELECT FROM " Set RS = Server.CreateObject("ADODB.Recordset")
3
by: wvmbark | last post by:
First time poster... I just found this forum and it appears there's plenty of people here that could make short work of problem that's been driving me absolutely bonkers for months. Every day we...
4
by: jbrumbau | last post by:
Hello, I have been successfully using a database I've created for several months to populate an equipment list for a project we've been working on. However, the form has recently stopped working...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.