GoToRecord on Split Form with Hidden Fields

  • Thread starter Thread starter shm135
  • Start date Start date
S

shm135

Hi,

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!
 
Back
Top