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
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