One to many

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

My database has 2 tables: tblPatInfo and Timing with one to many relationship
Timing table has the status of the records: Sent to Nurse, Letter to
Provider, back from Provider, and Complete.
I need to create a form that exclude completed records. Since a record has
all the status
I can’t through out the completed records
Thanks
 
Amin,
You didn't tell us what the field definition of Completed is.
Usually, Completed would be a True/False field, with a checkbox on your
form to indicate True or False (Checked or Unchecked)
If so, in the query behind your report should have...
= False
in the criteria of the Completed field.
 
the field definition is text

Al Camp said:
Amin,
You didn't tell us what the field definition of Completed is.
Usually, Completed would be a True/False field, with a checkbox on your
form to indicate True or False (Checked or Unchecked)
If so, in the query behind your report should have...
= False
in the criteria of the Completed field.
--
hth
Al Camp
Candia Computer Consulting - Candia NH
http://home.comcast.net/~cccsolutions
 
My database has 2 tables: tblPatInfo and Timing with one to many relationship
Timing table has the status of the records: Sent to Nurse, Letter to
Provider, back from Provider, and Complete.
I need to create a form that exclude completed records. Since a record has
all the status
I can’t through out the completed records
Thanks

Use a criterion on the PatientID of

NOT IN(Select PatientID FROM Timing WHERE [Status] = "Complete")

This will show all records in tblPatInfo *except* those for which any
record in Timing contains "Complete" in the Status field.


John W. Vinson[MVP]
 
Thanks John. works

John Vinson said:
My database has 2 tables: tblPatInfo and Timing with one to many relationship
Timing table has the status of the records: Sent to Nurse, Letter to
Provider, back from Provider, and Complete.
I need to create a form that exclude completed records. Since a record has
all the status
I can’t through out the completed records
Thanks

Use a criterion on the PatientID of

NOT IN(Select PatientID FROM Timing WHERE [Status] = "Complete")

This will show all records in tblPatInfo *except* those for which any
record in Timing contains "Complete" in the Status field.


John W. Vinson[MVP]
 
thanks, but the other status for the same patient record still shown. if the
patient record has all the status. then I want to through that Pation record
out of the form
 
Back
Top