Query Criteria Help

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

Guest

I am having problems with the criteria in my query.
I have [forms]![form name]![txtMachineNum] In the criteria section for my
field MachineNum in my qrySearch Query. In my form I have a list box and the
value RowSource is qrySearch. When I open the form instead of the list box
opening to the current value of txtMachineNum a Enter Parameter Value message
box opens. From what I have read it shouldn't open the Enter Parameter Value
message box but should opne to the current value of txtMachineNum. Is
something wrong in the criteria section of my query?

Thanks
 
Playa said:
I am having problems with the criteria in my query.
I have [forms]![form name]![txtMachineNum] In the criteria section for my
field MachineNum in my qrySearch Query. In my form I have a list box and the
value RowSource is qrySearch. When I open the form instead of the list box
opening to the current value of txtMachineNum a Enter Parameter Value message
box opens. From what I have read it shouldn't open the Enter Parameter Value
message box but should opne to the current value of txtMachineNum. Is
something wrong in the criteria section of my query?


Is the name of your form really [Form Name]??

It's also important to note that the Row Source query does
not automatically refilter itself when the value of a form
control changes. You need to have:
Me.listboxname.Requery
in the text box's AfterUpdate event procedure. If the form
can have more than one record in its Record Source
table/query, you'll need that same statement in the form's
Current event procedure as well. The Current event requery
may also be needed to sync the list box when the form first
opens.
 
Back
Top