![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
|
Access 2002. I am trying to make previous record and next record command buttons work. If a user is on the first record, there is no previous record. So, I want the previous record button disabled. The code to accomplish this starts out: Private Sub Form_Current() Dim RecClone as Recordset Set recClone=Me.RecordsetClone() recClone.RecordCount When I open the form, I get an error message Type Mismatch. Debug takes me to code and highlight the Set RecClone statement. I can't get past this to see if following code is working. It seems like what I want to accomplish should be so easy since the built in navigation buttons in Access enable and disable themselves. If I knew how to write the code that says: If this is the first record then the previous button is disabled and if this is the last record then the next button is disabled. What am I doing wrong? Thanks! |
#2
| |||
| |||
|
|
Dim RecClone as Recordset Set recClone=Me.RecordsetClone() |
|
recClone.RecordCount |
![]() |
| Thread Tools | |
| Display Modes | |
| |