Combo Boxes and Forms

chrisjrice

Registered User.
Local time
Today, 20:24
Joined
Mar 26, 2002
Messages
37
I currently am developing a database to handle out IT Support Queries. As part of this I am creating an enquiry screen which will display the details of a query selected by whoever. Anyway i have created a form with a combo box (when droped down displays all the available query id's) this is unbound and is loaded from a query. I have created a macro which opens a form. I have specified the form I want open, and in the filter I have put in the query which the combo box is running over. On the combo box in the change event i have added this macro. The idea being that the user will select the id from the combo box and the form will load with the relevant details. All i seem to get is the first record in the database no matter what I try. Can anyone please help!!! I have tried all sorts.
 
Put the combobox on your main form. Base your main form on a query and in the QueryID field, set the criteria to =[Forms]![NameOfFormWhereComboIs]![NameOfCombo]
On the After_Update event of the combo, set the [event procedure] code to Me.Requery.
Make sure that you are using the correct value. In the query behind the combo, look at which column the QueryID code is in. This is the column you need to reference ie. If QueryId is in the second column, the criteria would be
=[Forms]![NameOfFormWhereComboIs]![NameOfCombo].Column(1) etc

HTH
 

Users who are viewing this thread

Back
Top Bottom