AccipiterQ
Programmer
I'm going to try to be as blunt as possible...I'm having a devil of a time figuring this out..
This is using Access 2000, and the Access Macro editor:
Alright, I've got a simple macro, called Ahead10, it uses the GoToRecord command, and for the offset I entered 10. I have a form i'm using this macro in. I made a button and attached the macro to it under the 'onclick event'. Now say there's 37 records in the form, I hit the button 3 times, and that takes me to record 31. But if I hit the button once more, I get an ugly 'action failed' dialogue box,becuase there's only 37 records, the action failed box looks unproffesional. I want to edit the macro so that if I hit the button and it would take me past the last record of the form it wouldn't display that ugly error message, it just tells me 'not enough records to skip this far' or something of that ilk. But I don't know what commands to use under Access's macro editor to do this Any help would be appreciated.
Thanks!
matt
This is using Access 2000, and the Access Macro editor:
Alright, I've got a simple macro, called Ahead10, it uses the GoToRecord command, and for the offset I entered 10. I have a form i'm using this macro in. I made a button and attached the macro to it under the 'onclick event'. Now say there's 37 records in the form, I hit the button 3 times, and that takes me to record 31. But if I hit the button once more, I get an ugly 'action failed' dialogue box,becuase there's only 37 records, the action failed box looks unproffesional. I want to edit the macro so that if I hit the button and it would take me past the last record of the form it wouldn't display that ugly error message, it just tells me 'not enough records to skip this far' or something of that ilk. But I don't know what commands to use under Access's macro editor to do this Any help would be appreciated.
Thanks!
matt