Default Query value if no Input

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a simple query which asks for a Result to search for. I would like
the dafult query value to be "Message" so I can hit enter without typing in
Message. How would I do this?
 
There may be other ways, but the one that seems to work is:

Select iif (isnull ([Enter a Value]), "Message", [Enter a Value]);

This will test the value returned from the InputBox that pops up to solicit
input and if the user simply hit Enter, this is interpreted as a NULL and
"Message" is the value; otherwise the value entered is used.

Good Luck!
 
Rod said:
I have a simple query which asks for a Result to search for. I would like
the dafult query value to be "Message" so I can hit enter without typing in
Message.


I think you want to use a criteria like:

=IIf([Enter Result] Is Null, "Message", [Enter Result])
 
Back
Top