Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Force Access to reveal active page.

Status
Not open for further replies.

dkaplan

Programmer
Jan 29, 2001
98
US
Is there any way to force Access to reveal which page object it considers active? I have two tabs on a form (the page objects) and my code (it's running a search) needs to know which object is currently active. Visible = true doesn't work, as Access seems to regard both tabs as visible at all times. Suggestions?
 
Did you look at ....
ActiveControl Property Example

The following example assigns the active control to the ctlCurrentControl variable and then takes different actions depending on the value of the control's Name property.

Dim ctlCurrentControl As Control

Set ctlCurrentControl = Screen.ActiveControl
If ctlCurrentControl.Name = "txtCustomerID" Then
. ' Do this.
.
.
ElseIf ctlCurrentControl.Name = "btnCustomerDetails" Then
. ' Do this.
.
.
End If
DougP, MCP

Visit my WEB site to see how Bar-codes can help you be more productive
 
Thanks.
With a little digging around I discovered that the following also works, specific to tabs (or as MS calls them 'page objects.')

if (me.tabCtrl.value = 0)
do this
else
do that
end if

'value' is the page index property of the page object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top