Tab Control and On Click Event

This is a multi-part message in MIME format.

------=_NextPart_000_0050_01CAB531.4407FE80
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

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

------=_NextPart_000_0050_01CAB531.4407FE80
Content-Type: text/html;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Dus-ascii" =
http-equiv=3DContent-Type>
<META name=3DGENERATOR content=3D"MSHTML 8.00.7600.16490"></HEAD>
<BODY>
<DIV><FONT size=3D2 face=3DArial><SPAN class=3D922430517-24022010>I have =
a tab control=20
object with two tabs: Front &amp; Back. I also have a Text Box called=20
txtSelected.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D922430517-24022010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN class=3D922430517-24022010>Here =
is what I can't=20
seem to get working:</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN =
class=3D922430517-24022010>Onclick Front - I=20
would like txtSelected to =3D "1"</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN class=3D922430517-24022010>
<DIV><FONT size=3D2 face=3DArial><SPAN =
class=3D922430517-24022010>Onclick&nbsp;Back -=20
I would like txtSelected to =3D "2"</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D922430517-24022010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN =
class=3D922430517-24022010></SPAN></FONT><FONT=20
size=3D2 face=3DArial><SPAN =
class=3D922430517-24022010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN class=3D922430517-24022010>Any =
suggestions=20
would be appreciated.</SPAN></FONT></DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D922430517-24022010></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT size=3D2 face=3DArial><SPAN=20
class=3D922430517-24022010>J</SPAN></FONT></DIV></SPAN></FONT></DIV></BOD=
Y></HTML>

------=_NextPart_000_0050_01CAB531.4407FE80--

0
Jay
2/24/2010 5:10:52 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1070 Views

Similar Articles

[PageSpeed] 24

Jay wrote:

>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

-- 
Marsh
MVP [MS Access]
0
Marshall
2/24/2010 5:29:59 PM
Thanks. Worked like a charm. 

-----Original Message-----
From: Marshall Barton [mailto:marshbarton@wowway.com] 
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


Jay wrote:

>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

--
Marsh
MVP [MS Access]

0
Jay
2/24/2010 5:36:44 PM
Reply:

Similar Artilces:

Excel 2003 - VBA
Hi Guys: A quick question on the "Workbook Open" event: When I load up Excel and open the workbook, this event triggers. If I then close the workbook, without closing Excel, then open the workbook, it does not occur. Close down the worksheet and Excel, then open it, it triggers. Is this normal operation? Could it have to do with the possibility the I had set Application.EnableEvents = False, before exiting the workbook. Craig Also put in sub auto_open() -- Don Guillett Microsoft MVP Excel SalesAid Software dguillett1@austin.rr.com "Craig Brandt" <brandtcraig...

Event errors #2
Hi, Was hoping someone could point me in the right direction, i have a couple of event errors in the NT event log and was wondering if anyone had come across them before and knows what to do about them. First one is: source: MSExchangeIS Private event ID: 1025 An error occurred. Function name or description of problem: EcCreateLink Error: 0xfffffeab Second one is: source: MSExchangeIS Private event ID: 1025 An error occurred. Function name or description of problem: EcProcessSearchMessageEvent Error: 0xfffffeab The only resolution that makes sense is running isinteg -fix which has been...

1 word doc, multiple tabs
Other people have referenced a tabbed view to be able to view multiple documents at one time. Really Windows 7 taskbar takes care of this. I, on the other hand, want to see multiple tabs within 1 document like Excel. Example of use: I'm thinking about writing a book, and I have SEVERAL scenes in my head. Right now I would have to create SEVERAL word documents to get them all down, then create a main document and copy and paste stuff back and forth as I write. With a single tabbed document, I could write all my scenes as individual tabs, then "link" them to the m...

Blank Quantities in Store Quantity Tab
I added items via Headquarters and left store quantity blank. Through store ops I did a purchase order to accept items to the store. Then I ran a 501 - request full item count. Now, in the HQ on the store quantity table, no stores are listed. Does anyone know how to fix this? Also, what am I doing wrong!? Thanks for the help in advance. diana This is a multi-part message in MIME format. ------=_NextPart_000_0070_01CAD7D2.5CD027D0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Diana, I don't see where you did a 250 wor...

Contacts Tab
Hi Under the Contacts tab of an Account record the only two columns displayed are Full Name and Company Phone. Is there any way to add other columns, for example, job title? If not in this version (v1.2) is there any word of this being included in version 2? Thanks Lee You can customize tables, view and forms - add or remove fields, columns, and textbox using CRM Customization. So answer to your question is YES, it is possible "Lee" <l.hargrave@btinternet.com> wrote in message news:394322d8.0409220250.5d5658e@posting.google.com... > Hi > > Under the Contacts tab of...

WebBrowser Control Displayed Font Size.
In Windows Explorer 7 a menu option is available to change the displayed font size. "View" > "Text Size". Several options are available; "Largest", "Larger", "Medium" etc. Is the functionality available to programmatically adjust the displayed font size in the WebBrowser control? The container for the control is in a Windows form. ...

2 pivot tables on one tab
Is it possible to put 2 Pivot tables on the same tab in my workbook? Or does anyone have any ideas on what would be the best way to chart Capital Pircahses? I have 5 coums and 4 rows. The rows are per division, and the columns are for the disposal amount, gain or loss, book value, depreciation & purchase price. I already have one pivot table in my report. Would this be too repeatative? Thanks You can put multiple pivot tables onto a worksheet. If the second one is based on the same data, select and copy the first, select a cell some distance away, and paste it. Each pivot table...

Printing a single form which has tabs
Hello I have created a form in which I am inputting survey data. There are 5 tab pages in this form. I want to print all 5 tabbed pages. I want to create a button called "Print Record". When one clicks on this button, I want it to print all 5 pages. At the moment, I print one page. Then tab to the second page and print, and so. Can I set it so that one you click on print, you can decide on which page you want to print or print all five pages? Can I do this in code? If this isn't the right section, please direct me. Thank you in advance. Generally spea...

Click on link problems #2
When I click on a url link in email---a box opens saying "Open Link Browser". And also a browser window. How do I get rid of the smaller link browser? Read your reply on your post of the 17th? -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Service Pack 1 ----- "Robin" <robinhood2@juno.com> wrote in message news:atmnk0pgs4m272iunkegt0rvq4ssjqisig@4ax.com... > When I click on a url link in email---a box opens saying "Open Link > Browser". A...

MSChart control
suppose i created an application with a mschart control, done all the job of drawing and all that, is it possiable in any way to translate the info of the mschart cotnrol to a spreadshit info that excel could import? I succeed in converting the onto from my listctrl to a file excel could read but what can i do with the chart? I thought about not using the mschart control and create my own charting code using the knowen methods in mfc for drawing lines and etc. but again how can i convert to information to an excel shape? ...

Set form field on double click
I am using MS Access 2003. I have a continuous form that is run off of a query "srbScientific Review". The query's criteria is set to [Enter Last Name] in the LastName field. That part works fine. I get my continuous form that shows LastName, DocID, and Title of Document. I would like to double click on the DocID and have the following happen: 1. Open another form "publications" 2. Set the SRBId field to the DocId field that I double clicked on. PLEASE help. I think I need to bookmark, clone.... I'm very confused. As a kick in the right ...

how to capture the event changing the name of a sheet
I would like to trigger a procedure whenever a user change the sheet name or add anew sheet. The event of new sheet can be captured but I don't know how to capture the event changing sheet's name. Please help No event is generated when a sheet changes names... What were you needing the event for? Perhaps we can help you get around the problem. -- HTH... Jim Thomlinson "Satyapal Kaushal" wrote: > I would like to trigger a procedure whenever a user change the sheet name or > add anew sheet. The event of new sheet can be captured but I don't...

Microsoft Form 2.0 Controls in VC causing error
My application developed using VC++6.0 in W2K running well in my development PC (with Visual Studio 6.0 installed). When I run the same application in a client PC without VS installed, I get this error: An unsupported operation was attempted. At last I found out it is caused by the 'Microsoft Form 2.0 commandbutton' and 'Microsoft Form 2.0 Label'. After I removed these controls the application run fine. I have registered the file FM20.dll using Regsvr32 and it show succeeded. May someone help how can I make those controls run well in my client PC? Thanks. ...

How to handle KeyDown event of CListCtrl?
I use Visual C++ 4.2 Professional and I am developing an application with a CPropertySheet as the main window and 6 CPropertyPages as the sub window. In each CPropertyPage there is a CListCtrl in a Report view style and a Button. My question is: 1. If the selection / focus is on one of the CListCtrl item and user press the Return key, then it must open a new modal dialog to show the content of items. Or if I double-click on the item or I click the Button with focus on the CListCtrl, it will open a new modal dialog showing the content of the item. How to do that? I have tried the L...

Can't click through on links in e-mail
Ever since one of those "critical upgrades" we have been unable to click through to a web page from links in e-mail. This is a real pain for links that say "click here" rather than the URL. A blank, white Explorer session opens along with an error window that says "Locate Browser Link" with a cursor blinking in the "file name" field. Any help? TIA Bob Should have mentioned that we are running XP Home edition V5.1 and Outlook 2002 (not Outlook Express) SP-2. "Bob" <usenetsp_mtrap@hotmail.com> wrote in message news:#TpOgKQyDHA.246...

Very weird tab control behaviour !?!
I have a form with a tab control. All looks great in design view but in form view the tab and caption part of the control moves up and overlays the controls above. I tried increasing the height of the form and moving the tab control way down but in form view the tabs and captions still float way up and overlay the control above. I've been stuck on this for hours and am completely stuck. No idea how to fix this. I tried removing the tab control completely then pasting it back - same result. Another strange clue, when I increase the TOP property on the tab control, it never changes in...

Resizing controls
I am working with Access 2007. When I try to resize one of the controls, all of the controls resize to the size of the one that I am working with. How can I separate the controls so that I can resize them individually? I never encountered this problem with Access 2003. There is a setting that you need to change, to change it from "tabbed form" to "overlapping." See my "quick tutorial" on my website here: http://www.btabdevelopment.com/main/QuickTutorials/A2K7Howtochangefromtabbedforms/tabid/81/Default.aspx -- Bob Larson Access World Forums Super Moderat...

Please Help!Tree control:GetSelectedItem()
I am using VC++.NET IN WIN 2000 In the project I am using tree contro When I make right click on the item in the GetSelectedItem() func it doesn't read the correct data from the selected item it reads the data from the previous selected item This problem doesn't matched if I make first left click on the item and after that right click,in this scenario it reads the correct item. Why the GetSelectedItem() doesn't return the correct item data void test::OnNMRclickTree1(NMHDR *pNMHDR, LRESULT *pResult HTREEITEM hmyItem,hti; OnTvnSelchangedTree1(pNMHDR, pResult) ... void test::On...

AxtiveX ctrl subclassing custom control
Hi! There are plenty of examples where ActiveX ctrls are subclassed from Windows controls such as BUTTON, EDIT, etc. I've got custom control based on CRichEditCtrl, and I'd like to build ActiveX ctrl subclassed from it. I'm not quite sure how this should be done. In all examples I found the approach is like this - BOOL CActiveXWrapperCtrl::PreCreateWindow(CREATESTRUCT& cs) { cs.lpszClass = _T("EDIT"); return COleControl::PreCreateWindow(cs); } well, my custom control does not have registered name, so what should i do? many thanks kdv09 ...

Events from ActiveX
Hello, I added a class to my project using the "Class from an ActiveX Control" Wizard. So if I want to add event handler functions, no events will be shown on the property page. Next, I tried to add the event functios manually with a EVENTSINK_MAP but this also don't work. Can anyone help me? thanks in adavance marc ...

Referancing a subforms control
i have a value i would like to assign to a subforms control but i am having no luck in doing so. the main form is called "Site_info_frm" the subform is called "FAsub_info_frm" and the control is called "File_path" could someone show me how to put them together to insert the value. Thanks Forms!Site_info_frm!FAsub_info_frm.Form!File_path Note, though, that depending on how you added FAsub_info_frm as a subform on Site_info_frm, it's possible that the subform control on Site_info_frm might be named something other than FAsub_info_frm. If the subform cont...

Hyperlink control
Is it possible to have a control hyperlink to open a specific worksheet in an excell file. I tried adding #'wksName' to the hyperlink properties but that gave me an invalid reference error opening excel. ...

MSExchangeDSAccess Event 2061
Every 20 minutes we get the following error event: Event Type: Error Event Source: MSExchangeDSAccess Event Category: LDAP Event ID: 2061 Date: 1/17/2006 Time: 8:34:18 PM User: N/A Computer: AUSTIN2K3 Description: Process MAD.EXE (PID=2084). An LDAP search call failed - Server=<server fqdn> Error code=80040957. Base DN=, Filter=(legacyExchangeDN=), Scope=2. Running Windows 2003 SP1, AD + Exchange 2003 SP2 on the same server. Any clues? Thanks in advance. Alex. See if it helps: http://eventid.net/display.asp?eventid=2061&eventno=1784&source=MSExchangeDSAccess&...

Event ID: 1025
W2K3/E2k3 SP1 I have two event 1025 on two different Exchange Systems. I have done about as research as I can find. (1) Event ID: 1025 Source: MSExchangeIS Mailbox Store ECupdate 0x8004010f. Does anyone know if this is database corruption? If so, run eseutil or would isinteg to the trick? (2) Event ID: 1025 Source: MSExchange IS Mailbox ECupdate: EcTestMessage 0x8007000e. If so, run isinteg for this one? Any Help on the above two would be greatly appreciated. I do cringe when I see the Event ID 1025 because there is not much information out there on these. Except that as we kn...

Exchange 2003 SP2 event 7518 Sender ID must be configured
Exchange 2003 SP2, IMF and Sender ID configured. NOTE: I have read the blurb from Microsoft about the 7518 showing up in the event log if no SMTP server is configured for the SMTP virtual server (default SMTP virtual server). The server I am working on is the only SMTP server (i.e. no separate Gateway), and its configured on the IP address for filter enabled, apply sender ID - so thats not it directly. I have configured "ALL UNASSIGNED" and the local Nat'd internal address for sender id, but the event keeps popping up in the event log. Has any one else seen this? The sender i...