Only one record showing

cjamps

Registered User.
Local time
Today, 18:56
Joined
Feb 2, 2009
Messages
29
I have 2 tables. One is called DOCKETS and one is called TASK LIST. The field serialnumber in DOCKETS is the primary key which is related to the field serialnumber in table TASK LIST. The table DOCKETS
has a field called DocketNumber. Both fields, serialnumber and docketnumber are unique and can not have duplicates.

I have the following query which is asking the user for a serial number and all the records in the TASK LIST table that contain that serialnumber are supposed to show however only one record shows.

PARAMETERS [SerialNumber] Text ( 10 );
SELECT Dockets.SerialNumber, Dockets.DocketNumber, [Task List].MailingDate, [Task List].TimeAmt, [Task List].DueDate, [Task List].Task
FROM [Task List], Dockets IN 'db3.mdb'
WHERE ((Dockets.SerialNumber=[Task List].SerialNumber))
ORDER BY Dockets.SerialNumber;
 
Then there is only one serialnumber that excists in both the [Task list] and Dockets tables.
 
In the table DOCKETS the serial number is unique. In the table TASK LIST there could be several records containing the same serial number because there could be several tasks each due on a different date per docket. So I wanted all the TASK LIST records that have the same serial number to show up. I have set the relationship for both tables on the field SerialNumber.
 
" Both fields, serialnumber and docketnumber are unique and can not have duplicates. "

" there could be several records containing "

Make your mind up??

If your query returns one record / task then there is only one task. Eventhough your SQL is not quite 'proper' Access SQL, it is perfectly OK as far as I can see.

Verify (manually) that your serial number does indeed have multiple tasks....
 
I meant to say that both fields serialnumber and docketnumber are unique in the table DOCKETS. However there could be many records in the table TASK LIST
 

Users who are viewing this thread

Back
Top Bottom