M
mhmaid
I have a search form with one unbound field named , a button to run a query
with the following sql
SELECT *
FROM Patients
WHERE patient Like "*" & Forms!search!patient & "*" or country Like "*" &
Forms!search!patient & "*" or Diagnosisdetails Like "*" &
Forms!search!patient & "*" or Remarks Like "*" & Forms!search!patient & "*"
or Approvedby Like "*" & Forms!search!patient & "*" or Cpr Like "*" &
Forms!search!patient & "*" or Diagnosis Like "*" & Forms!search!patient & "*"
or Hospital Like "*" & Forms!search!patient & "*" or Procedure Like "*" &
Forms!search!patient & "*";
now , i want to add check boxes for each control like one chk box for
country , one for patienname ,etc,
the reason is , i want the query to search in a field only if the chk box of
that field is "yes"
offcourse i dont have these chk boxes in my table.this is only to reduce
the result of the query ( i want to get the result only for chk boxes ticked)
, may also need another chk box like "all"
searched the group but could not get any thing that worked.
how the sql should be in this case.
with the following sql
SELECT *
FROM Patients
WHERE patient Like "*" & Forms!search!patient & "*" or country Like "*" &
Forms!search!patient & "*" or Diagnosisdetails Like "*" &
Forms!search!patient & "*" or Remarks Like "*" & Forms!search!patient & "*"
or Approvedby Like "*" & Forms!search!patient & "*" or Cpr Like "*" &
Forms!search!patient & "*" or Diagnosis Like "*" & Forms!search!patient & "*"
or Hospital Like "*" & Forms!search!patient & "*" or Procedure Like "*" &
Forms!search!patient & "*";
now , i want to add check boxes for each control like one chk box for
country , one for patienname ,etc,
the reason is , i want the query to search in a field only if the chk box of
that field is "yes"
offcourse i dont have these chk boxes in my table.this is only to reduce
the result of the query ( i want to get the result only for chk boxes ticked)
, may also need another chk box like "all"
searched the group but could not get any thing that worked.
how the sql should be in this case.