Combo Box query for current record

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

Guest

I am sure this is a common issue, but I couldn't find it in my searches....

I have a form bound to a table called entry. The field 'speed' is a combo
list that pulls from a query called speedlist. The idea is that you can only
pick an applicable speed based on what is entered in the 'machinetype' and
'machinevendor' field. Works fine with one record, but obviously when i add
records the query is returning matches for each record in the entry table,
not just the current record. That makes my choices in the speed field
incorrect.
Is there a way to limit the query to just the current record?
 
Yes, use criteria that reference the form and refresh query once you have
selected the 'machinetype' and 'machinevendor'.

To use the form textboxes as criteria reference like this ---
[Forms]![YourFormName]![machinetype]

[Forms]![YourFormName]![machinevendor]
 
Ah!
For some reason I didn't think that would work with a bound form, but it
worked perfectly.
Thanks so much!

KARL DEWEY said:
Yes, use criteria that reference the form and refresh query once you have
selected the 'machinetype' and 'machinevendor'.

To use the form textboxes as criteria reference like this ---
[Forms]![YourFormName]![machinetype]

[Forms]![YourFormName]![machinevendor]

--
KARL DEWEY
Build a little - Test a little


Mariano said:
I am sure this is a common issue, but I couldn't find it in my searches....

I have a form bound to a table called entry. The field 'speed' is a combo
list that pulls from a query called speedlist. The idea is that you can only
pick an applicable speed based on what is entered in the 'machinetype' and
'machinevendor' field. Works fine with one record, but obviously when i add
records the query is returning matches for each record in the entry table,
not just the current record. That makes my choices in the speed field
incorrect.
Is there a way to limit the query to just the current record?
 
Back
Top