Hi All...
I have two command buttons on my main form, CmdNext and CmdPrevious.
When I open the form to display all the records, I want the CmdPrevious button to be disabled or hidden. I can do this disable or hide button, but the problem how to recognize that this is first record..
I tried :
If DFirst ("*","NameofQuery") Then
DoCmd.CmdPrevious.Enable = False
Else
DoCmd.CmdPrevious.Enable = False
End If
I have a problem in the DFirst, it's not working ..
Will any body help me where is my mistake please
I have two command buttons on my main form, CmdNext and CmdPrevious.
When I open the form to display all the records, I want the CmdPrevious button to be disabled or hidden. I can do this disable or hide button, but the problem how to recognize that this is first record..
I tried :
If DFirst ("*","NameofQuery") Then
DoCmd.CmdPrevious.Enable = False
Else
DoCmd.CmdPrevious.Enable = False
End If
I have a problem in the DFirst, it's not working ..
Will any body help me where is my mistake please