G
Guest
I want to activate/deactivate navigation buttons on my form depending on the
current record. At present I am using the code:
If Me.CurrentRecord = 1 Then
Me.GotoPreviousbutton.Enabled = False
Me.GotoFirstbutton.Enabled = False
Else
Me.GotoPreviousbutton.Enabled = True
Me.GotoFirstbutton.Enabled = True
End If
which works ok for GotoPrevious and GotoFirst buttons. I want to do the same
for GotoNext and GotoLast. On this newsgroup I have found the code:
If Me.BOF Then
Me.GotoPreviousbutton.Enabled = False
Me.GotoFirstbutton.Enabled = False
Else
Me.GotoPreviousbutton.Enabled = True
Me.GotoFirstbutton.Enabled = True
End If
If Me.EOF Then
Me.GotoLastbutton.Enabled = False
Me.GotoNextbutton.Enabled = False
Else
Me.GotoLastbutton.Enabled = True
Me.GotoNextbutton.Enabled = True
End If
which is giving me compilation orrors in Me.BOF and Me.EOF lines. What I
have to change / add to make it working ?
Thanks for help.
Tony
current record. At present I am using the code:
If Me.CurrentRecord = 1 Then
Me.GotoPreviousbutton.Enabled = False
Me.GotoFirstbutton.Enabled = False
Else
Me.GotoPreviousbutton.Enabled = True
Me.GotoFirstbutton.Enabled = True
End If
which works ok for GotoPrevious and GotoFirst buttons. I want to do the same
for GotoNext and GotoLast. On this newsgroup I have found the code:
If Me.BOF Then
Me.GotoPreviousbutton.Enabled = False
Me.GotoFirstbutton.Enabled = False
Else
Me.GotoPreviousbutton.Enabled = True
Me.GotoFirstbutton.Enabled = True
End If
If Me.EOF Then
Me.GotoLastbutton.Enabled = False
Me.GotoNextbutton.Enabled = False
Else
Me.GotoLastbutton.Enabled = True
Me.GotoNextbutton.Enabled = True
End If
which is giving me compilation orrors in Me.BOF and Me.EOF lines. What I
have to change / add to make it working ?
Thanks for help.
Tony