C
Chris
Hello All. I know this is a really simple question and it has probably been
answered 1000 times before.
I am trying to program some safeguards into my (navigation) command buttons
eg Not letting the user click next when there are no further records
I'm trying to use the code:
Dim Rst as RecordSource
Dim db as database
set DB to Current DB
IF rst.EOF then Me.cmdNext.enabled = False
Else me.cmdNext.enabled = True
End If
IF rst.BOF Then me.cmdPrevious.enabled = False
Else me.cmdPrevious.enabled = True
End IF
where am I going wrong?
answered 1000 times before.
I am trying to program some safeguards into my (navigation) command buttons
eg Not letting the user click next when there are no further records
I'm trying to use the code:
Dim Rst as RecordSource
Dim db as database
set DB to Current DB
IF rst.EOF then Me.cmdNext.enabled = False
Else me.cmdNext.enabled = True
End If
IF rst.BOF Then me.cmdPrevious.enabled = False
Else me.cmdPrevious.enabled = True
End IF
where am I going wrong?