Query return nothing

  • Thread starter Thread starter Ryan Clair
  • Start date Start date
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
 
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.?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top