How to know when the form is on the LAST record??

mohsinhq

Registered User.
Local time
Today, 09:10
Joined
Aug 2, 2004
Messages
90
Hi,

I have a continous form with only 5 records. I am trying to update each record with one click on a save button.

i am trying to do a loop so that it goes through each record using acnext but obviously it shows up with an error when i reach the end of a record set!

is there any way to know when the focus is on the last record and not show the error?

thanks in advance
 
Use validatino to check the record fulfils certain criteria i.e. a value exists.
If the validation falis end/skip/goto error handler.
 
Don't know how you're looping, but here's a couple thoughts...

Code:
With Me.Recordset
     .MoveFirst
     Do While [B]Not .EOF[/B]
          'Do Stuff...
          .MoveNext
     Loop
End With

or 

For x = 1 To Me.Recordset.RecordCount
     'Do Stuff
Next x
 

Users who are viewing this thread

Back
Top Bottom