I want to loop through the records in a form using the following structure:
DoCmd.OpenForm "MyForm"
Do While IsNull(MyForm!FieldName) = False
'Execute some commands
DoCmd.GoToRecord,,acNext
Loop
Normally the last record in the form is blank, so MyForm!FieldName is null. I've used this format successfully in many places, but now I have a form that does not have a blank record at the end and I get an error message that I can't go to the next record. In the form properties I allow additions, but there is no blank record. How can I tell when I've reached the last record?
Thanks for any suggestions.