G
Guest
Using Access 2000 (9.0.6926 SP3)
I have a basic form used for viewing records. On this form are next and
previous record buttons located at the top of the page. My client wants
these buttons to be enabled/disabled when appropriate. Sounds easy enough
but I'm running into a strange problem.
In the Form_Current event is the code:
If Me.CurrentRecord = Me.RecordsetClone.RecordCount Then
Me.cmdNextRecord.Enabled = False
Else
Me.cmdNextRecord.Enabled = True '**
End If
If I put a break point at '**, the code breaks when the form opens.
However, in break mode, I get the following from the immediate window:
?Me.CurrentRecord = Me.RecordsetClone.RecordCount
True
Is there some sort of timing issue here? The record source is not changing
(to my knowledge) in the OnCurrent event. If I put a break point before the
code, and step through slowly, it seems to work fine. I have a new(er) PC
that shouldn't have any problems with the forms record source query. Any
thoughts, suggestions, comments, or even snide remarks are wanted. Thanks in
advnace.
I have a basic form used for viewing records. On this form are next and
previous record buttons located at the top of the page. My client wants
these buttons to be enabled/disabled when appropriate. Sounds easy enough
but I'm running into a strange problem.
In the Form_Current event is the code:
If Me.CurrentRecord = Me.RecordsetClone.RecordCount Then
Me.cmdNextRecord.Enabled = False
Else
Me.cmdNextRecord.Enabled = True '**
End If
If I put a break point at '**, the code breaks when the form opens.
However, in break mode, I get the following from the immediate window:
?Me.CurrentRecord = Me.RecordsetClone.RecordCount
True
Is there some sort of timing issue here? The record source is not changing
(to my knowledge) in the OnCurrent event. If I put a break point before the
code, and step through slowly, it seems to work fine. I have a new(er) PC
that shouldn't have any problems with the forms record source query. Any
thoughts, suggestions, comments, or even snide remarks are wanted. Thanks in
advnace.