Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / January 2006

Tip: Looking for answers? Try searching our database.

Event When User Clicks On A Control On A Tab's Page

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
BerkshireGuy - 12 Jan 2006 18:50 GMT
I have a several paged tab control on my form.

On each page, there are several different controls.  One page may have
5 controls and the other may have 10.

Can I run specific code when one of those controls on a particular page
is clicked.

I dont have to have to put code in each controls on click event and the
Tabs Click event only fires when you click "outside" of the actual
control and somewherre on a blank part of the tab page.

Basically - I've placed a bunch of text boxes (with a flat effect) to
make them look like command buttons.  Then when a user selects the
control - I want the background of the selected control to turn a
different colors to show its been selected.  Ofcourse the code would
have to cycle through the rest of the controls to make sure that the
other "command buttons" are set to the unselected color.

I know option boxes would be a lot easier - but I am trying something a
little different.

Thanks,
Brian
Tim Marshall - 12 Jan 2006 18:58 GMT
> Can I run specific code when one of those controls on a particular page
> is clicked.

Use the tab on change event.  Each page in a tab control has a page
index property value, which is on the format tab of the page properties
window.  I use it like this:

Private Sub tabWo_Change()

'If value is 9 (the advanced custom page), run the following afterupdate
event to get the rowsource for the list box

    If Me.tabWo.Value = 9 Then

        Me.subAdv.Form.fraOraClause_AfterUpdate

    End If

End Sub

You may be able to do it by referring to other properties, but the above
works fine for me.
Signature

Tim    http://www.ucs.mun.ca/~tmarshal/
^o<
/#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
/^^ "Whatcha doin?" - Ditto  "TIM-MAY!!" - Me

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.