Tab Control and On Click Event

J

Jay

I have a tab control object with two tabs: Front & Back. I also have a
Text Box called txtSelected.

Here is what I can't seem to get working:
Onclick Front - I would like txtSelected to = "1"
Onclick Back - I would like txtSelected to = "2"


Any suggestions would be appreciated.

J
 
M

Marshall Barton

Jay said:
I have a tab control object with two tabs: Front & Back. I also have a
Text Box called txtSelected.

Here is what I can't seem to get working:
Onclick Front - I would like txtSelected to = "1"
Onclick Back - I would like txtSelected to = "2"


A tab control's Click event is nearly useless, use the
Change event instead.:

Select Case Me.tabconrolname
Case 0
Me.txtSelected = "1"
Case 1
Me.txtSelected = "2"
Case Else
MsgBox "you added a tab page and forgot the code for it"
End Select
 
J

Jay

Thanks. Worked like a charm.

-----Original Message-----
From: Marshall Barton [mailto:[email protected]]
Posted At: Wednesday, February 24, 2010 9:30 AM
Posted To: microsoft.public.access.formscoding
Conversation: Tab Control and On Click Event
Subject: Re: Tab Control and On Click Event

I have a tab control object with two tabs: Front & Back. I also have a
Text Box called txtSelected.

Here is what I can't seem to get working:
Onclick Front - I would like txtSelected to = "1"
Onclick Back - I would like txtSelected to = "2"


A tab control's Click event is nearly useless, use the Change event
instead.:

Select Case Me.tabconrolname
Case 0
Me.txtSelected = "1"
Case 1
Me.txtSelected = "2"
Case Else
MsgBox "you added a tab page and forgot the code for it"
End Select
 

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