I'm working with Access 2002. I was wondering if anybody could provide
guidance on how to set up a dialogue box (dialogue box may not be the right
term), in a form that automatically returns a value from a table based on
answers chosen in two other combo boxes.
I'm not sure this is exactly what you mean, but you can create a Query
using form references as criteria. First create a small unbound Form
(frmCrit say) with your two combo boxes on it. Then, create a new
Query based on the table that you wish to search; on the criteria
under the fields you're searching put
=[Forms]![frmCrit]![comboboxname]
under each searched field.
It's best to base a Report (for printing) or Form (for onscreen
display) on this Query; put a command button on frmCrit to open it.
If you want to just display one single value, you can do it in a
different way. Put a textbox on the Form containing the combo boxes
with a Control Source
=DLookUp("[fieldname]", "[tablename]", "[searchfield1] = " &
[cboField1] & " AND [searchfield2] = " & [cboField2])
using your own object names of course. You may need to Requery the
textbox in the AfterUpdate event of each of the combo boxes.
John W. Vinson[MVP]