Open tab on a form

WILYWAYNE11

New member
Local time
Today, 02:52
Joined
Aug 27, 2022
Messages
20
I have a form with several tabs. I would like to create a short cut macro to open a specific tab. Can this be done????
 
Assuming your talking about a tab control,Yes. Set focus to the page or a control on the tab in question.
 
Here is an article on tab controls.


In it you would find that the tab control is actually a collection of tab pages. You place controls on a tab page. The tab control itself actually has a value which is the index to the current page. It is possible to read or update the tab control's value. Since the pages on the tab control are typical of Access collections, the first page in the tab control is page 0. You just set the tab control's value to the index of the page you want.

Note that setting the focus on a control that is on a particular tab page kills two birds with one stone, so to speak, since just changing the tab control's value might leave you with an suddenly no longer visible control having focus. Using the control.SetFocus method prevents that.
 
see this demo and see the macro of the button
 

Attachments

Users who are viewing this thread

Back
Top Bottom