How to create criteria query depends on control in form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have main form (unbound) and subform (recordsource from query1), and want
to set criteria in query depend on control Text1 in main form.

Now my criteria in query is =Forms!Form1.Text1. My subform show correct
data, but my boss also want to see all records such as not type in control
text1. How can I write criteria in query (show all record if control text1 is
null or show record according to value in text1)
 
Nova,

In the Criteria in your query, put this...
Forms!Form1!Text1 Or Forms!Form1!Text1 Is Null
 
Back
Top