Passing Data to a Combo Box

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

Guest

How can I limit the options displayed in a combo box before the form
containing the combo box is opened? I have eight buttons on a previous form
and, when a button is pressed, I want the combo box on the next page to
display only the values that are relevant.

For example, if the button named 'Europe' is pressed, the next form should
contain a a combo box showing the Countries which have 'Europe' in the
'Continent' field.

This strikes me as a really simple problem but I cannot work it out. I am
quite new to Access.
 
Don't know exactly how this would be done, but here's the approach I'd
consider for it. Write code the make the buttons set a public variable,
and then reference that variable in the combo box control on the next
form. Something like that.

grep
 
Create a query for the data table which contains the data you want t
display in your combo box. On the criteria line in the query build
filter using the controls on the previous form. Also, you will need t
use "Requery" after the controls have been updated so that the quer
displays the most recent control settings.

Go to http://support.microsoft.com and search the Knowledgebase fo
"Hos To Create Synchronized Combo Boxes". They explain and show how t
do it.

-shhotNblind-

Andrew said:
*How can I limit the options displayed in a combo box before th
form
containing the combo box is opened? I have eight buttons on
previous form
and, when a button is pressed, I want the combo box on the next pag
to
display only the values that are relevant.

For example, if the button named 'Europe' is pressed, the next for
should
contain a a combo box showing the Countries which have 'Europe' i
the
'Continent' field.

This strikes me as a really simple problem but I cannot work it out
I am
quite new to Access.


-
shootNblin
 
Back
Top