Combox select

  • Thread starter Thread starter hermie
  • Start date Start date
H

hermie

Hello
I have a tabbed form, in the first tab I have an option group which 6
choices. The choice will be stored in Table HG-001 field Area local On the
second tab I have a combobox. Now i like to have that when an option is the
optiongroup is choosen the combox in tab 2 select only the city related to
the option choosen.
So far I have done this:
In the afterupdate event of the option group i put:
Private Sub Frame79_AfterUpdate()
Me.cbomun.Requery
End Sub

In the rowsource of combobox of second tab I put:
SELECT tblMunConsorcio.[Area local], tblMunConsorcio.municipio FROM
tblMunConsorcio;

But combobox shows all areacodes and cities?

What I like to see is only the city from the option group choosen.

Do I something wrong?

Hope somebody can help me figuring this out.

Herman
 
Hi,


try with something like:


Me.ComboBoxNameHere.RowSource = "SELECT ... FROM ... WHERE
municipio=Nz(FORMS!formNameHere!ControlNameHere, municipio)"



Hoping it may help,
Vanderghast, Access MVP
 
Back
Top