Help With String To Include All*

CharlesWhiteman

Registered User.
Local time
Today, 21:11
Joined
Feb 26, 2007
Messages
421
In my query I have the following string in the criteria.

Like fCboSearch([Forms]![FrmSearchAllResellerSpecific]![txtReminder])

This links in with a module and allows users to narrow selection based on the critera but in my Db, where there the corresponding field is null it doesnt appear in the list and i need it to.

Any advice much appriciated. Thanks.
 
What I'm basically trying to say in the query is: If the text field called txtReminder on my form frmsearchresellerspecific is blank then show me all records including blank ones. But if the field on my form, frmsearchresellerspecific is not blank then only show me the records which are equal to the value in the field.

Here's my query string so far but I'm getting caught out

AND ((TblPrimaryData.DateReminder) Is Null)) OR If Not IsNull ([Forms]![FrmSearchAllResellerSpecific].[txtReminder]), (((TblPrimaryData.DateReminder) Like fCboSearch([Forms]![FrmSearchAllResellerSpecific]![txtReminder])));
 
Charles,

you need to change the coding in your module to cover whether or not the input arg is null. You cannot do it in the sql statement.
 
I didn't understand what you were doing here

AND ((TblPrimaryData.DateReminder) Is Null)) OR If Not IsNull ([Forms]![FrmSearchAllResellerSpecific].[txtReminder]), (((TblPrimaryData.DateReminder) Like fCboSearch([Forms]![FrmSearchAllResellerSpecific]![txtReminder])));

But to do what you are saying here

What I'm basically trying to say in the query is: If the text field called txtReminder on my form frmsearchresellerspecific is blank then show me all records including blank ones. But if the field on my form, frmsearchresellerspecific is not blank then only show me the records which are equal to the value in the field.

then

Code:
([Forms]![FrmSearchAllResellerSpecific].[txtReminder] is Null) OR ([Forms]![FrmSearchAllResellerSpecific].[txtReminder])

will achieve that

Brian
 

Users who are viewing this thread

Back
Top Bottom