hello,
i have navigation buttons on the bottom of my forms and
i disable them to prevent the user from going out of bounds
(that way, the user wont see an error message)
i have it working
but i was wonderring if there is a simpler way to find
the last record that a form uses...
right now, i'm using this code (this is a sample of my "Next Record" button)
'find current and lastrec numbers
CurrentRec = CurrentRecord
DoCmd.GoToRecord , , acLast
LastRec = CurrentRecord
'return to original rec
DoCmd.GoToRecord , , acGoTo, CurrentRec
'disable buttons
If CurrentRecord <> 1 Then
Me![Previous].Enabled = True
End If
If CurrentRecord >= LastRec Then
Me![Next].Enabled = False
End If
my "problem" is that, by moving to the last record (to find its value) and then moving back to the original record causes the form to flicker quite badly (because it displays the form moving back and forth through the records at a very high speed)
i was wonderring if there was a simpler way to find out what the last record is
or if there is a way to stop access from displaying the records while i find out which one is the last one
any input is greatly appreciated
thank you
Eric
i have navigation buttons on the bottom of my forms and
i disable them to prevent the user from going out of bounds
(that way, the user wont see an error message)
i have it working
but i was wonderring if there is a simpler way to find
the last record that a form uses...
right now, i'm using this code (this is a sample of my "Next Record" button)
'find current and lastrec numbers
CurrentRec = CurrentRecord
DoCmd.GoToRecord , , acLast
LastRec = CurrentRecord
'return to original rec
DoCmd.GoToRecord , , acGoTo, CurrentRec
'disable buttons
If CurrentRecord <> 1 Then
Me![Previous].Enabled = True
End If
If CurrentRecord >= LastRec Then
Me![Next].Enabled = False
End If
my "problem" is that, by moving to the last record (to find its value) and then moving back to the original record causes the form to flicker quite badly (because it displays the form moving back and forth through the records at a very high speed)
i was wonderring if there was a simpler way to find out what the last record is
or if there is a way to stop access from displaying the records while i find out which one is the last one
any input is greatly appreciated
thank you
Eric