board
Apr 10 2006, 08:45 AM
in the form current event i use this code to disable next button if on last record
'disable next button when on last record give focus to previous
If Me.NewRecord = True Then
[previous].SetFocus
[next].Enabled = False
Else
[next].Enabled = True
End If
What can i use to disable the previous button if on the first record.
Cheers
ScottGem
Apr 10 2006, 08:46 AM
Test for BOF
adamsherring
Apr 10 2006, 08:47 AM
Hi.
Try using the CurrentRecord Property. It will be set to 1 for the first record.
Hope that works for you,
Adam
board
Apr 10 2006, 08:51 AM
'disable previous button when on first record give focus to next
If CurrentRecord = 1 Then
[next].SetFocus
[previous].Enabled = False
Else
[previous].Enabled = True
End If
Many thanks
MrSiezen
Apr 10 2006, 08:53 AM
You can do something like this:
If me.Recordset.absoluteposition = 0 Then
[previous].Enabled = False
End If
MrSiezen
Apr 10 2006, 08:57 AM
Scott,
Me.Recordset.BOF is False if I'm at the first record. How do you use BOF for this?
Thx
dallr
Apr 10 2006, 09:19 AM
Take a look at this link from Jack and see if it can suite your needs.
Link 1 Dallr
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please
click here.