J
JohnV
I am reposting this message as I have not yet resolved the
problem:
I now have specified the form instead of using "Me!". I
still have the same problem.
I have also noticed that when I open the form from the
switchboard that my form no longer has the first record
loaded or the ability to navigate among the records. This
leads me to believe that the problem is on the initial
opening of the form from the switchboard.
Here is my current code:
Private Sub Combo32_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim fs As Form
Set fs = Forms!frmOfficeEmployees
Set rs = fs.Recordset.Clone
rs.FindFirst "[Office] = '" & fs![Combo32] & "'"
fs.Bookmark = rs.Bookmark
End Sub
Thanks,
JohnV
problem:
I now have specified the form instead of using "Me!". I
still have the same problem.
I have also noticed that when I open the form from the
switchboard that my form no longer has the first record
loaded or the ability to navigate among the records. This
leads me to believe that the problem is on the initial
opening of the form from the switchboard.
Here is my current code:
Private Sub Combo32_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim fs As Form
Set fs = Forms!frmOfficeEmployees
Set rs = fs.Recordset.Clone
rs.FindFirst "[Office] = '" & fs![Combo32] & "'"
fs.Bookmark = rs.Bookmark
End Sub
Thanks,
JohnV
-----Original Message-----
I think the switchboard does not know or recognize
the "Me!" - from the switchboard you must call the form
by name - the me reference only owrks when there is only
one possible form to refer to.-----Original Message-----
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