Page-Index of a Tab-Control from a SubForm

I am writing a small golf management database application.
I have a form (TournamentManagement) which has a 3 page tab-control
(TournamentTabCtrl).
The second page has a subform (Groups) which includes a tab-control
(SubFormTabGroupCtrl) with 6 pages.

I need to know the page-index of the main tab-Control (TournamentTabCtrl)
from the first page of this tab control..

 How can this be done?

 

Thanks in advance

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1

0
JoeProvenzale
3/4/2010 12:34:00 AM
access.formscoding 7493 articles. 0 followers. Follow

3 Replies
1182 Views

Similar Articles

[PageSpeed] 26

The Value of the tab control indicates the PageIndex of the page that has 
focus.

So, use an expression like this:
    =[Form].Parent![TournamentTabCtrl]
or in VBA code:
    Me.Parent!TournamentTabCtrl

-- 
Allen Browne - Microsoft MVP.  Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.


"JoeProvenzale via AccessMonster.com" <u58538@uwe> wrote in message 
news:a47ac93c34f45@uwe...
> I am writing a small golf management database application.
> I have a form (TournamentManagement) which has a 3 page tab-control
> (TournamentTabCtrl).
> The second page has a subform (Groups) which includes a tab-control
> (SubFormTabGroupCtrl) with 6 pages.
>
> I need to know the page-index of the main tab-Control (TournamentTabCtrl)
> from the first page of this tab control..
>
> How can this be done?
>
>
>
> Thanks in advance
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
> 
0
Allen
3/4/2010 1:29:06 AM
The tab control has a value that is equal to the number for the currently 
selected page.
Note that the page numbering starts at 0.
If you are on the first page, the tab control has a value of 0.

So your code can go

Select Case Me.TournamentTabCtrl
Case 0
    'code here

Case 1
    'different code here

Case Else
    'other code here
End Select


Jeanette Cunningham MS Access MVP -- Melbourne Victoria Australia

"JoeProvenzale via AccessMonster.com" <u58538@uwe> wrote in message 
news:a47ac93c34f45@uwe...
>I am writing a small golf management database application.
> I have a form (TournamentManagement) which has a 3 page tab-control
> (TournamentTabCtrl).
> The second page has a subform (Groups) which includes a tab-control
> (SubFormTabGroupCtrl) with 6 pages.
>
> I need to know the page-index of the main tab-Control (TournamentTabCtrl)
> from the first page of this tab control..
>
> How can this be done?
>
>
>
> Thanks in advance
>
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1
> 


0
Jeanette
3/4/2010 1:30:04 AM
Thanks very much. It was easier than I had imagined.

Allen Browne wrote:
>The Value of the tab control indicates the PageIndex of the page that has 
>focus.
>
>So, use an expression like this:
>    =[Form].Parent![TournamentTabCtrl]
>or in VBA code:
>    Me.Parent!TournamentTabCtrl
>
>> I am writing a small golf management database application.
>> I have a form (TournamentManagement) which has a 3 page tab-control
>[quoted text clipped - 8 lines]
>>
>> Thanks in advance

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/201003/1

0
JoeProvenzale
3/4/2010 2:29:22 AM
Reply:

Similar Artilces:

Problem using Microsoft Web Browser control
I am trying to access the Custom properties of a Web Browser ActiveX control on a form and I keep getting a message telling me that "The Operation on the Microsoft Web Browser object failed. The OLE server may not be registered. To register the OLE server, reinstall it." I searched TechNet and MSDN and could not resolve this. I reinstalled Access 2003 (I have 2003 and 2007 installed on my workstation, XP Pro) and still no resolution. Has anyone else seen this and if so, can you tell me how to resolve this? Jim Does anyone know the name of the file the message...

Formatting four pages onto one 12x18 sheet
I'm trying to figure out how to format a 12 x 18 sheet with four individual 5.5 x 8.5 pages on it. Any ideas? The closest I can get is under page setup...selecting "postcards" and that will give me three pages per sheet, but I need four. Any ideas or thoughts are greatly appreciated. If your printer can be custom setup to 12 x 18 then you can divide it into four parts. Are you sure you aren't trying to setup a 11 x 17 landscaped sheet? In any event, setup your printer first. File, Page Setup, Advanced on the right, type 18 width, 12 height or 17 width, 11 ...

Removing RAID controller at XP boot up
I installed a pci card with two ATA 133 HD drive ports it came with drivers, I think I installed the wrong driver (RAID instead of straight). Cant get rid of the Marvel Raid control because it comes up before boot and has presumably tucked itself in the bios somewhere. Is there a solution? Perhaps reflashing the bios? Charlie+ "Charlie+" <charlie@xxx.net> wrote in message news:k47mq55qel8a848nl8u1l7rp31uvvdhg4m@4ax.com... > I installed a pci card with two ATA 133 HD drive ports it came with > drivers, > I think I installed the wrong driver (RAID inste...

click on page form tab to filter subform
I have page tab with following names: Flat Rate, Global Rate, MSRP Rate. I would like to have subform only show the rates for each page tab. How do I go about doing this. I am new to VBA and from reading all the threads, I can't seem to find the one that fits my exact need. Please explain step-by-step since I am new. Let me know if I need to provide more details. Thank you. Hi Kris Presumably you have a field in the RecordSource of your subform that contains one of the three values (Flat Rate, Global Rate, MSRP Rate) or some other text or code that corresponds to these values....

Signature page not printed for Credit card transaction
Hello I have set up new POS system and the POS system does not print signature page for credit card use. I check 'require signarue' for the receipt from tender type window and print Z-out to apply it but it still does not printing out the signature page. Any Solution? Please be advised. thank you for your help! This is a multi-part message in MIME format. ------=_NextPart_000_0034_01C92FBD.0CA0D0C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Alex, Make sure the receipt is set to print it. Manager | Database | Register = Lis...

SubForm Upside Down!
Is it possible to turn the SubForm upside down so as you have the blank Text boxes at the top then the last entry underneath it Thanks for any Help......Bob Oops the Record Source: SELECT * FROM tblRemarks ORDER BY [SrNo]; Thanks Bob "Bob" <xxx@xx.xx> wrote in message news:f0bnl9$d3c$1@lust.ihug.co.nz... > > Is it possible to turn the SubForm upside down so as you have the blank > Text boxes at the top then the last entry underneath it > Thanks for any Help......Bob > If I cant turn it upside down, Is it possible to always show the blank row at the e...

how to use a saved master page
I have created a new master page and saved it as a .pub file. The question is when opening a new document, how do I apply the saved master file? Open the master file, copy, paste to your new publication. -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "Colin" <Colin @discussions.microsoft.com> wrote in message news:A3C59647-7D56-46B9-AA56-C707538ECDED@microsoft.com... >I have created a new master page and saved it as a .pub file. The question > is when opening a new document, how do I apply the saved mas...

Why do sheet tabs keep disappearing? Box in Tools is checked.
When I open a new or existing Excel file, the sheet tabs at the bottom may or may not show up. I have repeatedly gone to Tools, Options, View and made sure the sheet tabs box is checked, but still no tabs. How do I get them back? I can't get from one page of a workbook to another. This is in Offfice 2003. Hi Arlie, Try Tools/Options/General In the Sheets in new workbook box, check and see how many sheets are set to appear when opening a new workbook. Larry -- keithl816 ------------------------------------------------------------------------ keithl816's Profile: http://w...

Lebans tooltip control 10-28-07
I am trying to use the tooltip control on a form with a tab control, on which are the other controls I want to show information for. On controls that are outside the tab control, it works fine; on controls inside the tab control, the tooltip shows on text boxes only when they have the focus, and on check boxes not at all. I've tried every naming scheme for controls I can think of, without any luck. Anybody have any ideas about this??? Is it the same problem as using a subform???? I am using ACCESS 2003 -- Jack Walsh ...

Tab causes CStatic-derived object to repaint!!
Hi, I derived a class named CGroupBox from CStatic. I am using it the following way: 1. I created a dialog (and its corresponding CDialog-derived class) using the resource editor 2. In the dialog, I created a group box. 3. I mapped the group box component to a CGroupBox member of the dialog's class using the Class Wizard. I did this so that I could override OnPaint() and give the group box a custom look. When the dialog comes up, the focus is set to an edit control. As soon as I hit the TAB key to switch to the next edit control, the group box's label gets repainted--only the label,...

Spinner Control and Protected Worksheet
I have inserted a SPINNER control in my worksheet > thereafter, I have REMOVED its "Locked" checkmark (format control > protection). Then, I protected the worksheet. When I try to use the spinner after protecting the workseet, the system says: "The cell or chart you are trying to change is protected and therefore read-only"!!! VERY VERY FRUSTRATING. Any suggestions ???? (worksheet enclosed - protected without a password for testing). Attachment filename: test.xls Download attachment: http://www.excelforum.com/attachment.php?postid...

page numbers in Word 2007
Hello, I have a Microsoft Word 2007 document which has a title and table of contents on the first page and the various chapters on the following pages. I have used an automatic TOC and then clicked on the Insert tab and then Page Number -> Bottom of Page to insert page numbers. My problem is that I don't want the first page to be numbered so that the second page starts with the number 1. I have tried clicking Page Number -> Format Page Numbers... to set the first page number at zero but then when I delete the zero all page numbers are deleted by Word 2007 just as th...

Sum of calculated controls in footers
I have a report with the following groupings: 1.) Claimant 2.) Group 3.) Carrier in the Claimant footer I have the a control named max_ded with the following calculation =Max([Ded]). I need to be able to sum this field at the "group level", and then sum the "group level sum" at the carrier level. I have tried to sum(max([Ded])) and I get error messages. I have tried Sum([max_ded]) etc. Any ideas would be greatly appreciated. Thanks ...

Edit control
Hi, I have a dialog window to display as modal, in the dialog , there is a edit control, the focus is in edit control, I want to catch the enter key when user press enter in edit control, but the dialog close when I press enter key(I donot want to close the dialog). How can I catch the enter pressed message in dialog? Thanks Jessie Hi Jassie, Note that any time you press enter and if the focus is in an edit ctrl the CDialog::OnOk() func will be called. If you override CYourDlg::OnOk, it means that this func will be called, and, of course, it contains the call of CDialog::OnOk. Hence, y...

How do I publish to the web a 3 page web pubblication from Publis.
I created a 3 page web publication in Publisher 2003, but when I 'publish it to the web', only the first page is converted. What do I need to do? Review the FAQ - http://www.publishermvps.com/Default.aspx?tabid=30 -- David Bartosik - MS MVP www.publishermvps.com "Bazbo" <Bazbo@discussions.microsoft.com> wrote in message news:4B2BCFAD-8DB3-40C3-A0E2-B1EBDC60DE74@microsoft.com... > I created a 3 page web publication in Publisher 2003, but when I 'publish it > to the web', only the first page is converted. What do I need to do? ...

blank page prints after group (sometimes)
I have report of students with the class_id defined as a group. "Force New Page" is defined "Before Section". Whether I have a page and a group header defined (they can be the same anyway) or just a page header defined, I am getting the same problem: 27 students can fit onto a page. However, if there is a class of 25 students, the next page is blank except for the header. (I have not seen a class of 27 students so I have not tested that yet). I can't seem to find a way out of it. Where I am I going wrong? -- Message posted via AccessMonster.com http://www.acce...

macro to make different tabs in a same sheet
i have a column in my spreadsheet where there are different names can u suggest a macro which makes different tabs in that same exce workbook with the names of different ppl in front of names there is data, i want that data to be transferre also along with the respective names in that tab thank u frnd -- Message posted from http://www.ExcelForum.com Try this example The names are in column A of a sheet named Sheet1 Sub test() Dim cell As Range Dim WSNew As Worksheet For Each cell In Sheets("Sheet1").Columns("A").Cells.SpecialCells(xlCellTypeConstants) Set ...

Cannot delete extra page
I am working on a resume that was created using an earlier version of Word. It is two pages long but the document has a third page. When looking at the document with the paragraph information there is a paragraph on the third page but when I try to delete it I cannot using backspace, delete or any highlighting options I can find. Is there any way to just delete a page, without using formatting? I really would just like to save pages 1 and 2 as a pdf. It looks really bad to send a resume in a pdf with an extra page. I don't want to create the impression that I can't figure...

IE cannot display web page
I'm using WinXP and IE7 on one computer and WinXP and IE8 on another. Both are fully updated--the OS and Flash and Java. Neither computer has been able to display one website. It's for a light fixture store; and when I phoned the store today, the people who work there said they use WinXP and IE and the site displays just fine (although someone else told them last week that the web page couldn't be displayed). Any idea how I can get to this site? It's http://lightoptions.net/ Thank you! Jo-Anne It doesn't display for me, both on my Win7 machine ...

Filtering data on subforms
How can I filter data in a subform? The subform is a datasheet linked to a parent form (field) thanks! Alberto R. On Fri, 8 Jun 2007 22:37:14 -0500, "Alberto Rios" <albertorios1@aol.com> wrote: >How can I filter data in a subform? >The subform is a datasheet linked to a parent form (field) Base the subform on a Query selecting the records you want to see. John W. Vinson [MVP] ...

Refreshing tab problem
Hi to all, I do not know if anyone can help me on this one. I have a form that contains a tab control with 15 tabs on it, tab 1 contains approx 120 fields, half of them are calulated fields that are being updated on the current event of the form thru a private sub. On the tab control, I have 6 page with 1 subfrm on it, 2 pages with 4, 1 page with either 6,7 or 9 subfrm, very few subs are failry complex but most of them contains less than 25 controls on them. Loading the main form that have the tab control takes less than 1 sec. The pages are program to be loaded on a per demand...

Different ways to place the controls on Tab control.
Hi all, I am using Tab control in my VC++ program and to place the controls on Tab pages i am using dialog boxes. Is there any other way to place the controls on the Tab pages ? -- Thanks Ash Jings If you mean you are using a dialog template, thats fine. You may like this one: http://www.codeproject.com/KB/tabs/AMCustomTabCtrlDemo.aspx --- Ajay "Ash Jings" <jinagarashwini@gmail.com> wrote in message news:63E2932C-AC68-4AC1-86B4-7463A3482D07@microsoft.com... > > Hi all, > > I am using Tab control in my VC++ program and to place the controls on > Tab ...

Publisher 2002 Content Index
I need to do a cumulative newsletter index containing topics that I have published in the past 8 issues. Can Publisher 2002 do this effectively? Thanks Barry ...

Outlook Security Tab Missing
On one of our users' Outlook 2003 on XP SP2 machines, there is no security tab for the Outlook folders. Other tabs are also missing, like about half of them. Can't find the solution on a google search. It is Exchange 2003 on SBS server and outlook using cached mode same as all the other workstations - but this one is missing a number of tabs when I right click on any folder in Outlook. Please help. thanks Paddy do you mean the "permissions" tab? is this user the actual owner of the mailbox? is the delivery point of the email the mailbox or a personal folder? -- Su...

Creating Control with multiple comboboxes
Hello, I am using MFC VC6 and I am trying to create an activex control which contains multiple combo boxes but I am at a loss where to start. Does anybody know of a simple sample that could point me in the right direction. Thanks, Shaun Shaun wrote: > > Hello, > > I am using MFC VC6 and I am trying to create an activex control which > contains multiple combo boxes but I am at a loss where to start. Does > anybody know of a simple sample that could point me in the right > direction. > > Thanks, > Shaun The wizard sets up a skeleton ActiveX control project...