run query from form input

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

Guest

I have a form where you input a value, then run a query based on the value,
then display the results of the query in the same form. When you enter the
value in the form and hit enter, or tab, the rest of the form does not update
with the results of the query. I think I have to put something in the ON
EXIT property of the value field, but I can't remember what it is.
 
Marvin said:
I have a form where you input a value, then run a query based on the value,
then display the results of the query in the same form. When you enter the
value in the form and hit enter, or tab, the rest of the form does not update
with the results of the query. I think I have to put something in the ON
EXIT property of the value field, but I can't remember what it is.


What do you mean "run a query" and how does that relate to
what the form is supposed to do? Normally you should set
the form's RecordSource property instead of "run a query".

If you already have some code to "run a query" or perform
some other related actions? We would need to see it to
figure out why it isn't doing what you want.
 
By run a query, I mean extract data from a database based on certain
criteria. It relates to a form, because the criteria for the qurey is input
from the form, also, that same form displays the results of that qurey. So,
you enter a number on the form, hit enter, and the info you want appears on
the form.

Thanks, Jl5000, I also found out REQUERY works.
 
If Requery solves your problem, then it is the preferred
approach. Refresh does not do all the things that Requery
does (check Help for details).
 
Back
Top