Tab Control

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

We have an annoying feature on 1 form in a database. The form has a tab
control, with 6 pages, and when we click on a command button to go to next
record on a form we do so but the current tab page goes to Page 5.

Any advice or suggestions as to how, when we go to the next record we remain
on the same tab page

Using Access 2002

TIA
Tom.
 
Tom said:
We have an annoying feature on 1 form in a database. The form has a
tab control, with 6 pages, and when we click on a command button to
go to next record on a form we do so but the current tab page goes to
Page 5.
Any advice or suggestions as to how, when we go to the next record we
remain on the same tab page

Using Access 2002

TIA
Tom.

Do you have some code in the current event of the form? This is not normal
behavior.
 
Rick

Thanks for the input

The offending line in the current event is:

Forms("Members").Controls("TabCtl28").style = 1

Not sure why this line is there as it is a database that we have taken
over - any suggestions?

Tom
 
Tom said:
Rick

Thanks for the input

The offending line in the current event is:

Forms("Members").Controls("TabCtl28").style = 1

Not sure why this line is there as it is a database that we have taken
over - any suggestions?

Remove the line?
 
Tom said:
Forms("Members").Controls("TabCtl28").style = 1

Not sure why this line is there as it is a database that we have taken
over - any suggestions?


The style property of a tab control sets the visual appearance of the
tabs. 1 sets them to buttons. If you don't need/want the appearance of
the tabs to change dynamically then set the style in the controls
property sheet and remove any code that changes it.
 
That line of code doesn't change the Tab page.

Check the CommandButton_Click Event code also. You are looking for a line
of code similar to:

Me.TabControl = 4

or

Me.TabControl.Pages(4).SetFocus
 
Back
Top