From: Afrosheen via AccessMonster.com on
Hi Allen, Thanks for helping out. I really appreciate it. I did find
something I could use for the last record.



Afrosheen wrote:
>It works great. Thanks to you. I really appreciate it.
>
>I have another question, but if you feel I need to repost I will.
>
>When I get to the last record by pressing the Next button, pressing Next
>again will produce a blank record. Then pressing Next again will give me the
>"error" so I can exit.
>I'm trying to stop having it go to the blank record. This is the code"
>
>Private Sub cmdNext_Click()
>10 On Error GoTo Err_cmdNext_Click
>20 Screen.PreviousControl.SetFocus
>30 DoCmd.GoToRecord , , acNext
>
>Exit_cmdNext_Click:
>40 Exit Sub
>
>Err_cmdNext_Click:
>
>50 If Err.Number <> 2105 Then
>60 Err.Description = Err.Description & " In frmabprint1"
>70 Call LogError(Err.Number, Err.Description, "bday_print_click()")
>80 Else
>90 Call MsgBox("End of Records!! Make your choice or start over.",
>vbInformation, Application.Name)
>100 cmdNext.Enabled = False
>110 End If
>
>120 Resume Exit_cmdNext_Click
>end sub
>
>>Set AllowAdditions to Yes.
>>Set the Locked property of your text boxes to Yes, or cancel the form's
>[quoted text clipped - 8 lines]
>>>>>
>>>>> End Sub

--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1