Query return nothing

R

Ryan Clair

I thought I remembered a VBA command/syntax for capturing the blank
return value of a query... Probably doesn't make any sense, example
below:

If nothing is returned, tell the user that nothing was returned without
showing the blank output.

Appreciate the help. Tried searching the groups for it but couldn't
find it.

Ryan
 
K

Ken Snell \(MVP\)

Tell us the context in which you're wanting to do this. I assume it's within
a form's programming, but... what is the setup of the form (subform being
used?), etc.?
 
R

Ryan Clair

Actually, I've just been told I can't do the quick and dirty way I
wanted to do it (what my question pertained to).

I really want to check a value (we can call the textbox textA) against
a table and see if it is already in it. The value is typed in by the
user and the check is done at the After Update event. Not only must
there be a check for textA in the database but also textB which is
before the selection of textA. Both need to be checked at the same
time. Once it is checked, a label is shown that states it's already in
the database.

The form they are on doesn't have a record source so I thought of using
that to grab the values via query using the recordsource command on
textA's After Update event and pull them into a hidden text boxes and
compare the value to textA. Couldn't seem to get it to work. It would
always have the name# error in the hidden textboxes. I'm able to run
the query outside of the form but not inside it.

Thanks,

Ryan
 
Top