Tab Control

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.
 
R

Rick Brandt

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.
 
T

Tom

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
 
R

Rick Brandt

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?
 
R

rkc

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.
 
V

Van T. Dinh

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
 

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

Top