Form population based on a parameterized select query. Help neede

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

Guest

I have a form that is based on a select query that takes one parameter. How
can I code my form to use a combo box to select the value for this parameter,
and have the form automatically populate once this value has been selected?
The form has around 30 elements that need to be filled from this parameter.
 
Jim said:
I have a form that is based on a select query that takes one parameter. How
can I code my form to use a combo box to select the value for this parameter,
and have the form automatically populate once this value has been selected?
The form has around 30 elements that need to be filled from this parameter.


The simplest way is to put the combo box in the form's
header section. Then modify the query to use a reference to
the combo box instead of using a pop up prompt parameter.
The parameter would look like:
Forms,yourform.thecombobox

In order to sync the form's data to a new selection in the
combo box, add a line of code to the combo box's AfterUpdate
event:
Me.Requery
 
Back
Top