yippiekyyay
Programmer
Hello forum (again!),
I am trying to program my own navigation buttons but am having a bit of a problem! (which is strange because I am copying the example right out of my textbook except they are using the DataEnvironment and I am using ADO).
The code:
If frmForm.adoControl.Recordset.BOF = True Then
cmdPrevious.Enabled = False
End If
looks straight forward enough but it won't ever be true on the first record - instead, you can go back one more and get get a blank record (same is true for EOF - it's not true until after the last record).
Any ideas on what I could be doing wrong? I was thinkng of using the recordcount - but then wouldn't I end up with the same problem? I am also unsure of how to say "recordset.record(1)" (or something to that effect).
Thanks - any help would be greatly appreciated!!!
-Sean
I am trying to program my own navigation buttons but am having a bit of a problem! (which is strange because I am copying the example right out of my textbook except they are using the DataEnvironment and I am using ADO).
The code:
If frmForm.adoControl.Recordset.BOF = True Then
cmdPrevious.Enabled = False
End If
looks straight forward enough but it won't ever be true on the first record - instead, you can go back one more and get get a blank record (same is true for EOF - it's not true until after the last record).
Any ideas on what I could be doing wrong? I was thinkng of using the recordcount - but then wouldn't I end up with the same problem? I am also unsure of how to say "recordset.record(1)" (or something to that effect).
Thanks - any help would be greatly appreciated!!!
-Sean