Expressions in Queries

  • Thread starter Thread starter Steven Revell
  • Start date Start date
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
 
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)
 
Back
Top