M
Martin Folley
I cannot see the wood for the trees with this error.
The error occurs at Me.Bookmark = rstMe.Bookmark
I am trying to set the contents of a form's list box according to the time
of day when it is opened. I can set the contents and the value of the control
I then call the control's click function to trigger the code that would run
should the control be clicked. This calls the following sub.
I cannot see any 'cancelling'. There is no filter involved on the form.
Any suggestions as to where I should look?
Thanks.
Sub MoveToPupil(lngPupilID As Long)
Dim rstMe As Recordset
Dim bkmkMe As BookmarkEnum
Set rstMe = Me.RecordsetClone
rstMe.FindFirst "[Pupil ID] = " & lngPupilID
If rstMe.NoMatch Then
MsgBox "Pupil ID not found (ID:" & lngPupilID & ")"
Else
Me.Bookmark = rstMe.Bookmark
End If
End Sub
The error occurs at Me.Bookmark = rstMe.Bookmark
I am trying to set the contents of a form's list box according to the time
of day when it is opened. I can set the contents and the value of the control
I then call the control's click function to trigger the code that would run
should the control be clicked. This calls the following sub.
I cannot see any 'cancelling'. There is no filter involved on the form.
Any suggestions as to where I should look?
Thanks.
Sub MoveToPupil(lngPupilID As Long)
Dim rstMe As Recordset
Dim bkmkMe As BookmarkEnum
Set rstMe = Me.RecordsetClone
rstMe.FindFirst "[Pupil ID] = " & lngPupilID
If rstMe.NoMatch Then
MsgBox "Pupil ID not found (ID:" & lngPupilID & ")"
Else
Me.Bookmark = rstMe.Bookmark
End If
End Sub