I have created a form with two comboboxes. One selects company representatives by zip and the other by city. Zip combo works fine because there is always only one zip. There can be several like city names so in my combobox I show city, county and state.
However, whenever a city is selected, it chooses the 1st record in the database no matter which was selected in the combobox.
I see that this is happening because the code says rs.FindFirst...
I tried the following code but it does not...
Is there a simple solution to my questions or am I in over my head? Thanks for any help.
However, whenever a city is selected, it chooses the 1st record in the database no matter which was selected in the combobox.
I see that this is happening because the code says rs.FindFirst...
Code:
Private Sub Combo60_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[PO_NAME] = '" & Me![Combo60] & "'"
Me.Bookmark = rs.Bookmark
Combo60.Value = PO_NAME.Value
Combo40.Value = ZIP_CODE.Value
etc.....
I tried the following code but it does not...
Code:
Set rs = Me.Recordset.Clone
rs.FindFirst "[PO_NAME] = '" & Me![Combo60] & "AND [ST_ABBREV] = " & Me.Combo60.Column(3) & "'"
Me.Bookmark = rs.Bookmark
Is there a simple solution to my questions or am I in over my head? Thanks for any help.