R
Rob W
Greetings,
Have several forms where I have removed the navigation bar and use four
buttons to navigate and add records :-
Next Record
Previous Record
First Record
Last Record
I then have check on the previous and next records to ensure they wont try
to access records that dont exist i.e. records below 0 using code :-
Private Sub cmdPrevious_Click()
If [CurrentRecord] > 1 Then
Private Sub cmdNext_Click()
With Recordset
If .AbsolutePosition = .RecordCount - 1 Then
DoCmd.GoToRecord , , acNewRec
Else
DoCmd.RunCommand acCmdRecordsGoToNext
This method leaves itself open to problems when you have half filled in
forms or entered invalid data, rather than validate each field upon
entry/exit does anyone have an easy to use error handling code for 2046?
Thanks
Rob
Have several forms where I have removed the navigation bar and use four
buttons to navigate and add records :-
Next Record
Previous Record
First Record
Last Record
I then have check on the previous and next records to ensure they wont try
to access records that dont exist i.e. records below 0 using code :-
Private Sub cmdPrevious_Click()
If [CurrentRecord] > 1 Then
Private Sub cmdNext_Click()
With Recordset
If .AbsolutePosition = .RecordCount - 1 Then
DoCmd.GoToRecord , , acNewRec
Else
DoCmd.RunCommand acCmdRecordsGoToNext
This method leaves itself open to problems when you have half filled in
forms or entered invalid data, rather than validate each field upon
entry/exit does anyone have an easy to use error handling code for 2046?
Thanks
Rob