J
JohnV
I have a form that contains a subform. The form has a
combo box that allows the user to select from and then
synchronizes the subform to filter on that item.
The problem is that when I open the form through the
Switchboard I get an error when I select an item from the
combo box:
"Run-time error '3021':" and "No current record"
I noticed in the code for the combo box which I included
below that it uses a bookmark. This is the point where it
errors. As I stated earlier, when I open the form
directly it works fine.
Private Sub Combo32_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Office] = '" & Me![Combo32] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Any help would be appreciated.
Regards,
JohnV
combo box that allows the user to select from and then
synchronizes the subform to filter on that item.
The problem is that when I open the form through the
Switchboard I get an error when I select an item from the
combo box:
"Run-time error '3021':" and "No current record"
I noticed in the code for the combo box which I included
below that it uses a bookmark. This is the point where it
errors. As I stated earlier, when I open the form
directly it works fine.
Private Sub Combo32_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Set rs = Me.Recordset.Clone
rs.FindFirst "[Office] = '" & Me![Combo32] & "'"
Me.Bookmark = rs.Bookmark
End Sub
Any help would be appreciated.
Regards,
JohnV