"Arnold" <ee*******@earthlink.net> wrote in message
news:18**************************@posting.google.c om...
Hey there,
I just put the following code:
DoCmd.GoToRecord , , acLast
in the On Open event of my form, which has 2 subforms. The following
error message appears when the form now opens:
"You entered an expression that has an invalid reference to the
property Form/Report." But, after clicking the OK on the msgbox, the
form opens to the last record.
I've used this before without problems. Is this a simple fix?
Thanks much
Arnold
Are you absolutely sure the error message is coming from the main form's
open event? You can set a breakpoint to check this. Is that the complete
code you have, or do you use error handling? Have you made sure the code
all compiles?
In any case, if I wanted to go to the last record, I might use soemthing
like this:
With Me.RecordsetClone
.MoveLast
Me.Bookmark = .Bookmark
End With
Fletcher