swilliams2785
Registered User.
- Local time
- Today, 10:36
- Joined
- Jun 24, 2010
- Messages
- 19
I wanted to add a button with an event procedure to an existing form that would skip to the next record unless the end of the file was encountered in which case it would jump to the first record. I envision the code would look something like this:
If (test for end of file) = False Then
DoCmd.GoToRecord , , acNext
DoCmd.GoToPage (1)
Else
DoCmd.GoToRecord , , acFirst
DoCmd.GoToPage (1)
End If
I have used EOF in the ”IF” test but it doesn’t work. The test always fails. I have gone through several combinations of code elements but none were successful. The form containing the button is tied to a filtered query named qryMarksEntryK. The field name for the filter is STDNO. Any suggestions on how I might accomplish this?
If (test for end of file) = False Then
DoCmd.GoToRecord , , acNext
DoCmd.GoToPage (1)
Else
DoCmd.GoToRecord , , acFirst
DoCmd.GoToPage (1)
End If
I have used EOF in the ”IF” test but it doesn’t work. The test always fails. I have gone through several combinations of code elements but none were successful. The form containing the button is tied to a filtered query named qryMarksEntryK. The field name for the filter is STDNO. Any suggestions on how I might accomplish this?