Combo Box Help

S

Shelly Jackson

I have two combo boxes on a form. The first one is called Region, the
second is called Fieldofc.

When the user selects the Region, I want the selections in the combo box
Fieldofc to reflect the user's choice. The Rowsource for Fieldofc is blank
and I put this code into the Afterupdate in the Region combo box

Dim strSQL As String

strSQL = "Select tblRegion.ID, tblRegion.Subofc, tblRegion.PM, " _
& "tblRegion.PMPH, tblRegion.Ext, tblRegion.Region " _
& "FROM tblRegion " _
& "WHERE tblRegion.Region = " & Me.Region & " " _
& "ORDER by tblRegion.Subofc; "
Me.FieldOfc.RowSource = strSQL

It works, but when I open up my form, the Fieldofc combo box is always empty
and does not store the selection made.

How do I fix this?

TIA
S. Jackson
 
S

Shelly Jackson

Thanks Mark, but the solution was so simple, I am embarrassed to say. I set
the Control Source for the 2nd list Box to Fieldofc and that worked.

Thanks though!

S. Jackson
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top