Querying 3 items in the same field

  • Thread starter Thread starter Emily Peralta
  • Start date Start date
E

Emily Peralta

Hello,
My database has a patient table w/ all the demographic
info and a diagnosis table listing all patients'
diagnoses linked by PatientID. I'm trying to allow the
user to search for patients w/ up to 3 different
diagnoses (for example, someone who has diabetes,
hypertension, and arthritis), and open the form
displaying those patients' demographic information. I
have created 3 different queries that build upon the
previous (query1 searches for the 1st diagnosis, query2
searches for the 2nd diagnosis from the results of
query1, and so on). I want to open up a recordset of
query3 so that if there are no matches, all the user gets
is a msgbox, not a blank form. The problem is I can't
open a recordset of a stored query. Right now I'm simply
changing the recordsource of the Patient Information form
to the query, but I get a blank form if there are no
results. I know there is a better way, but I cannot
figure it out. Please help!

Thanks in advance,
Emily Peralta
 
Thank you Ashby for your reply. I tried your suggestion,
but I'm still getting a blank screen. I msgbox the
recordcount, and it says "1", but shows a blank screen.
I'm not sure what I'm doing wrong.
 
Back
Top