Single person query

Charlie2

Registered User.
Local time
Today, 19:13
Joined
Mar 28, 2002
Messages
79
I am trying to build a query that will produce the records for one person from my database.
The query I have got produces all persons results, I have tried adding Where [FirstName]="Jack"
But this produces a single row of empty cells.
can anyone show me what am doing wrong?

Charlie
 
In the Criteria of the First Name field type the Name of the Person exactly as it is in the table. If you don't know the exact spelling of the name, but know the first few characters you can add:

Like Jac* or

Like *jac*

to the criteria row.

HTH
 
what If

what if I want to search for a number 1. how do I do that, I am not too sure now that the first name field is included in my query for this. I think I only included the ID number.

SELECT tblInPatients.ID_Patient, tblTreatment.TreatmentHistoryID, tblNurses.NurseID, tblNurses.NFirst_Name, tblNurses.NSurname, tblDoctors.DoctorID, tblDoctors.First_Name, tblDoctors.Surname
FROM tblTreatment INNER JOIN (tblDoctors INNER JOIN (tblNurses INNER JOIN tblInPatients ON tblNurses.NurseID = tblInPatients.NurseID) ON tblDoctors.DoctorID = tblInPatients.DoctorID) ON tblTreatment.TreatmentHistoryID = tblInPatients.TreatmentID
WHERE (((tblInPatients.First_Name)="Jack"));
 
In the criteria of the Patient ID field just put in the number

your SQl should look something like...


SELECT tblInPatients.ID_Patient, tblTreatment.TreatmentHistoryID, tblNurses.NurseID, tblNurses.NFirst_Name, tblNurses.NSurname, tblDoctors.DoctorID, tblDoctors.First_Name, tblDoctors.Surname
FROM tblTreatment INNER JOIN (tblDoctors INNER JOIN (tblNurses INNER JOIN tblInPatients ON tblNurses.NurseID = tblInPatients.NurseID) ON tblDoctors.DoctorID = tblInPatients.DoctorID) ON tblTreatment.TreatmentHistoryID = tblInPatients.TreatmentID
WHERE (((tblInPatients.ID_Patient)=1));
 
brilliant

Great, thanks, ive been suffering for hours.

Charlie
 

Users who are viewing this thread

Back
Top Bottom