I have a single record form that I placed a List Box on.
The form and the List Box are based on the same table.
I'm synching selected value in the list box to sync with the form's date
using the following code in the After Update of the List Box:
This works fine but I'm running into a problem when I try to update the List Box data after I've made
changes to the form's date.
When I make changes to the form's data I use the After Update of form to requery
the form and lIst Box:
Code:
Me.Requery<br> Me!lstListing.Requery
Problem is I get Runtime error'3021': No current record.
Any ideas how I can make sure the data in the list box syncs with the form dara?
James
The form and the List Box are based on the same table.
I'm synching selected value in the list box to sync with the form's date
using the following code in the After Update of the List Box:
Code:
Private Sub lstListing_AfterUpdate()
Dim rs As DAO.Recordset
Set rs = Me.Recordset.Clone
With rs
.FindFirst "ContactID=" & Me.lstListing
If Not .NoMatch Then
Me.Bookmark = .Bookmark
End If
End With
End Sub
This works fine but I'm running into a problem when I try to update the List Box data after I've made
changes to the form's date.
When I make changes to the form's data I use the After Update of form to requery
the form and lIst Box:
Code:
Me.Requery<br> Me!lstListing.Requery
Problem is I get Runtime error'3021': No current record.
Any ideas how I can make sure the data in the list box syncs with the form dara?
James