Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Pass value to a query

Status
Not open for further replies.

dodgyone

Technical User
Jan 26, 2001
431
GB
Within my code it checks various things onscreen and places resulting values in text boxes (not the best solution but it works). Within the query it points to these text boxes for it's criteria:

Code:
[Forms]![Output Utility]![valCriteria]

The problem is that I want to send the text values "Is Null" or "Is Not Null" which are held in the text box. It is being taken as a string rather a literal command.

Is there any way of passing this to query as it should be interpreted?
 
Try an if statementent.

if([Forms]![Output Utility]![valCriteria]="Null",null,[Forms]![Output Utility]![valCriteria])

You could nest another statement to get the 'is not null'.

hope this helps

Stephen
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top