How to create criteria query depends on control in form

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)
 
S

Steve Schapel

Nova,

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

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