search engine

R

Radhika

The problem I am encountering is with a database where measurements need to
be recorded. The two tables of concern are tbl_Demographic (primarkey: MRN#)
and tbl_PhysicalExam (Primary key: MRN# +Date). I am trying to create a seach
engine where I first select a name from combo box 1, and a date from combo
box 2 (once the name is selected in combo box 1, only the dates associated
with that particular pateint appear in combo box 2). Once the name and date
are selected, the associated measurements appear in a subfrom.
Below is the method I used to generate such a search engine:
1. Created a blank form called 'Form 1'
2. Created Combo box 1 and combo box 2 on 'Form 1'
3. Used the following select query in the row source of combo box 1: SELECT
tbl_Demographic.[MDACC#], tbl_Demographic.LastName, tbl_Demographic.FirstName
FROM tbl_Demographic ORDER BY [MDACC#], [LastName], [FirstName];
4. Used the following select query in the row source of combo box 2: SELECT
DISTINCT tbl_LymphPhysicalExam.Date FROM tbl_LymphPhysicalExam WHERE
(((tbl_LymphPhysicalExam.[MDACC#])=Forms!Form1!Combo1)) ORDER BY
tbl_LymphPhysicalExam.Date;
5. Created a subform whose recorde source is a select query: SELECT
tbl_PhysicalExam.[MDACC#], tbl_LymphPhysicalExam.Date,
tbl_LymphPhysicalExam.FacialMeasurements,
tbl_LymphPhysicalExam.[FacialCircumference:MeasuesTaken],
tbl_LymphPhysicalExam.[cm Diagonal Circumference(around the chin to back of
head)], tbl_LymphPhysicalExam.[cm Submental Circumference] FROM
tbl_LymphPhysicalExam;
6. Linked the child fields: MDACC#, Date
7. Linked Master fileds: Combo 1, Combo 2

The search engine allows me to select a name and the assicated dates the
first time. However, when i go back to combo box 1 and select another name,
the dates that show up are those associated with the first name I selected
and they do not get refreshed. How can I fix this?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top