Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run time error 3021

Status
Not open for further replies.

jonnj

Programmer
Jun 20, 2003
29
US
I have a form with an unbound combo box(row source a table). When anything is clicked from the combo box it brings up data in a sub form.
When I use the form from the navigation pane it works fine and correctly but when I call it from the switchboard it bombs with a run time error 3021,(no current record) from a code in the Private Sub after update.
Code as follows:

Private Sub Text0_AfterUpdate()
'Find the record that matches the control.
Me.RecordsetClone.FindFirst "[designation] = '" & Me![Text0] & "'"
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub


It bombs on the last line-"Me.RecordsetClone.Bookmark"

I have another form set up exactly the same way and it works fine from the navigation pane and the switchboard.

I have gone over line for line on each form and everything is where is should be.

Why the form works from the navigation pane and not the switchboard is frustrating!

Any Help greatly appreciated
John
 
I have solved my own dilemma.
I put the form on the switchboard in the"add" mode when it should have been in the "edit" mode.

However I would like to understand why it bombed in the add mode and works in the edit mode.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top