By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,963 Members | 920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,963 IT Pros & Developers. It's quick & easy.

Using the On Click event on a tab control

P: 4
Hello. I've entered code in the "On Click" event of a Page on a Tab Control. But when I click on the tab of the Page, the code doesn't even get read. I've put a Breakpoint in the middle of the code and the code never pops up. What am I doing wrong?
Thank you,
Amy
Oct 24 '06 #1
Share this Question
Share on Google+
3 Replies


P: 3
In place of the Page On Click event, use the Tab On Change event, such as

/CODE/
Dim bytTabNow As Byte

bytTabNow = Me!TabDetail.VALUE
/CODE/

where the Tab Control is named "TabControl". The VALUE returned will be the "Page Index" value of the page that was clicked.

Dave
Oct 25 '06 #2

100+
P: 106
Hello. I've entered code in the "On Click" event of a Page on a Tab Control. But when I click on the tab of the Page, the code doesn't even get read. I've put a Breakpoint in the middle of the code and the code never pops up. What am I doing wrong?
Thank you,
Amy
What sort of code?
Try to put the code in detail section of the form,
Open form in design view, than on the tab where it says detail reight click. select the event tab, and put your code on let say onClick.

Hope this works.

I tried the following code for a test and it worked.

Private Sub Detail_Click()
DoCmd.Beep

End Sub
Oct 25 '06 #3

MMcCarthy
Expert Mod 10K+
P: 14,534
Hello. I've entered code in the "On Click" event of a Page on a Tab Control. But when I click on the tab of the Page, the code doesn't even get read. I've put a Breakpoint in the middle of the code and the code never pops up. What am I doing wrong?
Thank you,
Amy
Open the form in design view and go to the relevant page. Open the properties window and check the event tab. Make sure that the On Click event has [Event Procedure] in it.
Oct 25 '06 #4

Post your reply

Sign in to post your reply or Sign up for a free account.