J
JamesJ
This is getting annoying.
I have a form with a listbox (lstDvd) both are based on the same select
statement.
(tblDvd).tblDvd has 4 fields: DvdMovieID, DvdMovieTitle, DvdMovieType and
DvdSynposis.
The only visible column in the listbox is DvdMovieTitle. On the form I have
placed all 3 fields. When I select a title in the listbox I'm using the
following
code so the form and the lisbox are on the same record:
Private Sub lstDvd_AfterUpdate()
Me.RecordsetClone.FindFirst ("DvdMovieID = " & Me!lstDvd)
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Here's the problem. When I click the New Record button the form goes
to the new record and DvdMovieTitle has the focus. When I move to
another row in the list box I get the following error message:
'2001' You canceled the previous operation
I'm using the following in the AfterUpdate of the form:
Private Sub Form_AfterUpdate()
Me.Requery
Me.lstDvd.Requery
End Sub
The record gets saved but I must close and then reopen the see it.
I'm using the same code with different objects in another form but
I'm getting a different error message when I select another row in it's
listbox:
'3021' No current record. The listbox goes blank until I click End.
In both cases the debugger goes to:
Me.Bookmark = Me.RecordsetClone.Bookmark
No fields are required either at the table or form level.
Any help will be extremely appreciated.
James
I have a form with a listbox (lstDvd) both are based on the same select
statement.
(tblDvd).tblDvd has 4 fields: DvdMovieID, DvdMovieTitle, DvdMovieType and
DvdSynposis.
The only visible column in the listbox is DvdMovieTitle. On the form I have
placed all 3 fields. When I select a title in the listbox I'm using the
following
code so the form and the lisbox are on the same record:
Private Sub lstDvd_AfterUpdate()
Me.RecordsetClone.FindFirst ("DvdMovieID = " & Me!lstDvd)
Me.Bookmark = Me.RecordsetClone.Bookmark
End Sub
Here's the problem. When I click the New Record button the form goes
to the new record and DvdMovieTitle has the focus. When I move to
another row in the list box I get the following error message:
'2001' You canceled the previous operation
I'm using the following in the AfterUpdate of the form:
Private Sub Form_AfterUpdate()
Me.Requery
Me.lstDvd.Requery
End Sub
The record gets saved but I must close and then reopen the see it.
I'm using the same code with different objects in another form but
I'm getting a different error message when I select another row in it's
listbox:
'3021' No current record. The listbox goes blank until I click End.
In both cases the debugger goes to:
Me.Bookmark = Me.RecordsetClone.Bookmark
No fields are required either at the table or form level.
Any help will be extremely appreciated.
James