GoToRecord on Split Form with Hidden Fields




I have a split form with a datasheet on top and my form on the bottom.
The form has about 6 controls and the datasheet has two. I am hiding
four of the fields from appearing in the datasheet.

I would like a button on the form to take me to the next record and a
button to take me to the previous record. With the four controls
hidden on the datasheet, I use this code to move to the next record:

DoCmd.GoToRecord , , acNext

I get error 2105, You can't go to the specified record. However, when
I unhide the four fields from the datasheet, the button functions as
it is supposed to. Does anyone know a way to work around this and get
my buttons to work, while still hiding the four fields in the
datasheet? Please let me know. Thanks!

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question