criteria for text

L

Liverlass3981

Hi,
I've created a database in Access and I have a table with PatientID, e,g
001. I also have a field called DiabetesComplications. This is text and
includes illnesses and diseases which the patient may have. For example, I
may have entered in this field:
Retinopathy? Neuropathy? Ischaemic heart disease, Hypothyroid following
radio-iodine treatment, Dyslipidaemia.

My problem is that I want to bring up a list of all patient with Ischaemic
heart disease. So in my query I add the fields PatientID and
DiabetesComplications. In the criteria I put "Ischaemic heart disease". When
I run the query, no patients at all are listed. I tried the query with just
"heart" in the criteria but still to no avail!

Can anyone tell me where i'm going wrong?
many thanks.
 
S

Stefan Hoffmann

hi,
I've created a database in Access and I have a table with PatientID, e,g
001. I also have a field called DiabetesComplications. This is text and
includes illnesses and diseases which the patient may have. For example, I
may have entered in this field:
Retinopathy? Neuropathy? Ischaemic heart disease, Hypothyroid following
radio-iodine treatment, Dyslipidaemia.
I would consider normalizing your tables here. Create a table defining
your diseases and use a diabetes complications table:

Disease:
ID (Auto-Inc, Primary Key)
DisplayName (Text(255), Not Null, Not Empty)

DiabetesComplication:
PatientID (Primary Key)
DiseaseID (Primary Key)
My problem is that I want to bring up a list of all patient with Ischaemic
heart disease. So in my query I add the fields PatientID and
DiabetesComplications. In the criteria I put "Ischaemic heart disease". When
I run the query, no patients at all are listed. I tried the query with just
"heart" in the criteria but still to no avail!
You need a condition with the LIKE operator:

LIKE "*Ischaemic heart disease*"


mfG
--> stefan <--
 
L

Liverlass3981

Hi Stefan,
Many thanks for your response. My query now successfully runs the list of
patients I need.
I hope you can answer another problem I have:
I wanted to add another field to the query called OtherIllnesses and I put
LIKE "*Ischaemic heart disease*" in the criteria there, in case Ischaemic
heart disease was also noted in this field but not the DiabetesComplications
field. When I ran the query there were no patients at all listed again.
I'd be grateful if you could help again.
regards,
Liz.
 
S

Stefan Hoffmann

hi Liz,
I wanted to add another field to the query called OtherIllnesses and I put
LIKE "*Ischaemic heart disease*" in the criteria there, in case Ischaemic
heart disease was also noted in this field but not the DiabetesComplications
field. When I ran the query there were no patients at all listed again.
Seems like you have a combined condition. If the conditions are in one
line in the design view, then they are concatenated using AND. To use an
OR you have to place the field conditions on different lines.


mfG
--> stefan <--
 

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