Changing Records

M

Marc

Hello all

I have designed a form that has a "Tab Control" on it. The problem is that
if I click on the 3rd tab (for example) and then move to a new record, the
3rd Tab is still showing on the Tab Control. How do I get the Tab Control to
default back to the 1st Tab page every time a new record is selected?
 
B

Brendan Reynolds

Marc said:
Hello all

I have designed a form that has a "Tab Control" on it. The problem is that
if I click on the 3rd tab (for example) and then move to a new record, the
3rd Tab is still showing on the Tab Control. How do I get the Tab Control
to
default back to the 1st Tab page every time a new record is selected?


In the Current event procedure of the form ...

Me!NameOfYourTabControlHere.Value = 0

The Value of the tab control determines the tab that is visible. It's
zero-based, so a value of 0 corresponds to the first page, 1 corresponds to
the second page, etc.
 
M

Marc

Hello Brendan

Thank you so much. It works and I am really chuffed. I don't quite
understand why, though. I understand that the .value = 0 part sets the tab
control with index 0 as default, but why does putting this code in the
"Current" event procedure of the form work? i.e. What does the Currect event
procedure of the form do?

Thanks a million

Marc
 
P

Pieter Wijnen

The Form_Current Event is executed every time you move to a new set of data
including new

Very useful to set up lookup information etc.

Pieter
 

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