D
Dennis Snelgrove
I created a database in Access97 some time ago, and it's recently been
converted to Access2002(XP?). In it is a snippet of code that refers to the
RecordsetClone of a subform. Essentially what I was trying to do was have
the last 5 entries of a subform appear in the subform, since the users
(sigh...) demanded that the list be sorted in ascending chronological order
rather than in reverse order. It still works after conversion, but the first
time I either alter the form (frmMainSheet) or do a Compact/Repair on the
front end it gives me the following error:
Run-Time Error 2455:
You entered an expression that has an invalid reference to the property
Form/Report.
The Debug highlights this line - "If .Form.RecordsetClone.EOF = False Then".
I've checked the Object browser, and I can't find any properties or methods
for RecordsetClone, but it's never given me problems when it ran for over a
year and half in Access97. Has the RecordsetClone property been changed, or
are my references not translating properly from 97 to XP?
Thanks for any help offered. I'm at a loss at this point as to where to go
with this...
Following are the Library References that are in the front-end, and yes I do
want the Excel reference; I use an Excel function for some string
manipulation.
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office XP Web Components
With subfLogEntries
.Requery
If Len(.LinkMasterFields) > 0 Then
If .Form.RecordsetClone.EOF = False Then
.Form.RecordsetClone.MoveLast
.Form.RecordsetClone.MoveFirst
End If
If .Form.RecordsetClone.RecordCount > 5 Then
.Form.SelTop = .Form.RecordsetClone.RecordCount - 4
Else
.Form.SelTop = 1
End If
End If
End With
converted to Access2002(XP?). In it is a snippet of code that refers to the
RecordsetClone of a subform. Essentially what I was trying to do was have
the last 5 entries of a subform appear in the subform, since the users
(sigh...) demanded that the list be sorted in ascending chronological order
rather than in reverse order. It still works after conversion, but the first
time I either alter the form (frmMainSheet) or do a Compact/Repair on the
front end it gives me the following error:
Run-Time Error 2455:
You entered an expression that has an invalid reference to the property
Form/Report.
The Debug highlights this line - "If .Form.RecordsetClone.EOF = False Then".
I've checked the Object browser, and I can't find any properties or methods
for RecordsetClone, but it's never given me problems when it ran for over a
year and half in Access97. Has the RecordsetClone property been changed, or
are my references not translating properly from 97 to XP?
Thanks for any help offered. I'm at a loss at this point as to where to go
with this...
Following are the Library References that are in the front-end, and yes I do
want the Excel reference; I use an Excel function for some string
manipulation.
Visual Basic for Applications
Microsoft Access 10.0 Object Library
Microsoft DAO 3.6 Object Library
Microsoft Excel 10.0 Object Library
OLE Automation
Microsoft Visual Basic for Applications Extensibility 5.3
Microsoft Office XP Web Components
With subfLogEntries
.Requery
If Len(.LinkMasterFields) > 0 Then
If .Form.RecordsetClone.EOF = False Then
.Form.RecordsetClone.MoveLast
.Form.RecordsetClone.MoveFirst
End If
If .Form.RecordsetClone.RecordCount > 5 Then
.Form.SelTop = .Form.RecordsetClone.RecordCount - 4
Else
.Form.SelTop = 1
End If
End If
End With