I have a form with a combobox (cboGoToContact)
In the combo box After Update I have the following, to select a record for the form, by selecting a value from the combobox
Private Sub cboGoToContact_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ClientID] = " & Str(Nz(Me![cboGoToContact], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.subAppointments.Requery
End Sub
When I open the form, the above will not work, unless I switch to Design Mode, and then back to Form view.
Then it works perfectly.
If I close the form, and reopen it, I have to goto Design view again etc.
Any suggestions?
In the combo box After Update I have the following, to select a record for the form, by selecting a value from the combobox
Private Sub cboGoToContact_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[ClientID] = " & Str(Nz(Me![cboGoToContact], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
Me.subAppointments.Requery
End Sub
When I open the form, the above will not work, unless I switch to Design Mode, and then back to Form view.
Then it works perfectly.
If I close the form, and reopen it, I have to goto Design view again etc.
Any suggestions?