Expressions in Queries

S

Steven Revell

Hi,

I'm having trouble writing the conditions for a query.

I have three text boxes on my form:

txtDrive, txtCD, txtStudy

I have a query with the 3 fields in.

What i want to do is make it so what ever is typed into
the text boxes updates the query. I think I have managed
that but... if the text boxes have a nil value or a start
it doesn't show all records.

Is there anyway to show all records when the text boxes
are empty using the query conditions?

Thanks for your time,

Steven
 
M

Marshall Barton

Steven said:
I'm having trouble writing the conditions for a query.

I have three text boxes on my form:

txtDrive, txtCD, txtStudy

I have a query with the 3 fields in.

What i want to do is make it so what ever is typed into
the text boxes updates the query. I think I have managed
that but... if the text boxes have a nil value or a start
it doesn't show all records.

Is there anyway to show all records when the text boxes
are empty using the query conditions?

Change the criteria for each field to something like this:

= Foms!theform.thetextbox OR IsNull(Foms!theform.thetextbox)
 

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