query table present result in a form

cedtech23

Registered User.
Local time
Today, 12:04
Joined
Jan 28, 2006
Messages
25
I have a form that contains 3 text boxes, 1 Combo Box and a Command Button

txtLastName
txtFirstName
txtDOB
cboGender
cmdFind

I want the user to be able to enter at least one of these criteria and
for a form to pop up with a list of individuals that match the criteria

example

user enters Male under cboGender and Young in txtLastName
a Form will pop-up that will give a list of user that match those criteria


LastName, FirstName, DOB and Gender data are stored in tblPatientDemo


Any ideas on how I can accomplish this goal??
 
you will have to make an unbound form to gather the info. Then when the user clicks a button on the form it will take the info and modify a query def object to change the parameters.
 
KeithG said:
Then when the user clicks a button on the form it will take the info and modify a query def object to change the parameters.

I created the unbound form but it's the query that I am lost on how to start
 
SELECT tblPatientDemo.LastName, tblPatientDemo.FirstName, tblPatientDemo.DOB, tblPatientDemo.Gender
FROM tblPatientDemo where ( tblPatientDemo.LastName= forms!frmPatientLookup!txtLastName or forms!frmPatientLookup!txtLastName is Null) AND
(tblPatientDemo.FirstName= forms!frmPatientLookup!txtFirstName or forms!frmPatientLookup!txtFirstName is Null) AND
(tblPatientDemo.DOB= forms!frmPatientLookup!txtDOB or forms!frmPatientLookup!txtDOB is Null) AND
( tblPatientDemo.Gender= forms!frmPatientLookup!cboGender or forms!frmPatientLookup!cboGender is Null)
 

Users who are viewing this thread

Back
Top Bottom