D
Dkline
I have a form with a combobox. The user selects the "Producer Name" from
this combobox and they see the information for the selected record.
"NumPolicies" is the last control in the tab order on the form.
My problem is if they tab through all the fields on the main form, the
recordset advances but the combox does not. It retains what the user had
selected even though the recordset has moved on to the next record.
On exit from the last control on the form I'm trying to synchronize them
back to what is in the combobox. Alternatively if I can change the value in
the combox to match the now current record, that's OK too. Just want them to
agree on which record are we looking at now.
Below is my code to try and rectify the problem :
Private Sub NumPolicies_Exit(Cancel As Integer)
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Producer Name] = '" & Me![Combo24] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub
this combobox and they see the information for the selected record.
"NumPolicies" is the last control in the tab order on the form.
My problem is if they tab through all the fields on the main form, the
recordset advances but the combox does not. It retains what the user had
selected even though the recordset has moved on to the next record.
On exit from the last control on the form I'm trying to synchronize them
back to what is in the combobox. Alternatively if I can change the value in
the combox to match the now current record, that's OK too. Just want them to
agree on which record are we looking at now.
Below is my code to try and rectify the problem :
Private Sub NumPolicies_Exit(Cancel As Integer)
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Producer Name] = '" & Me![Combo24] & "'"
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub