Group:  Microsoft Access ยป microsoft.public.access.formscoding
Thread: Current page selected

Geek News

Current page selected
Akilah 12/12/2008 2:46:02 PM
Is there a way to determine which page on a tab is current (selected) or in
use. Thanks is advance.
Re: Current page selected
"Linq Adams via AccessMonster.com" <u28780[ at ]uwe> 12/12/2008 3:13:44 PM
CurrentPage = Me.TabControlName.Value

or simply

CurrentPage = Me.TabControlName

Remembering that the index is Zero-based, i.e. page one's value is 0, page
two is 1 and so forth. To get it to reflect the actual page number, where the
first page is page 1, simply use

CurrentPage = Me.TabControlName + 1

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

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

Re: Current page selected
Akilah 12/12/2008 3:54:00 PM
Thanks. Now that tells the page that is currently selected. Is there a way
to tell what page it is changing to on the tab.change. For instance, if I go
from page1 to page3, the current page is page1; how can I get the value of
page 3.

"Linq Adams via AccessMonster.com" wrote:

[Quoted Text]
> CurrentPage = Me.TabControlName.Value
>
> or simply
>
> CurrentPage = Me.TabControlName
>
> Remembering that the index is Zero-based, i.e. page one's value is 0, page
> two is 1 and so forth. To get it to reflect the actual page number, where the
> first page is page 1, simply use
>
> CurrentPage = Me.TabControlName + 1
>
> --
> There's ALWAYS more than one way to skin a cat!
>
> Answers/posts based on Access 2000/2003
>
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1
>
>
Re: Current page selected
Dale Fye 12/12/2008 4:38:10 PM
if you check for the value of the tabcontrol in the controls Change event, it
will give you the new page #, not the one you moved from.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



"Akilah" wrote:

[Quoted Text]
> Thanks. Now that tells the page that is currently selected. Is there a way
> to tell what page it is changing to on the tab.change. For instance, if I go
> from page1 to page3, the current page is page1; how can I get the value of
> page 3.
>
> "Linq Adams via AccessMonster.com" wrote:
>
> > CurrentPage = Me.TabControlName.Value
> >
> > or simply
> >
> > CurrentPage = Me.TabControlName
> >
> > Remembering that the index is Zero-based, i.e. page one's value is 0, page
> > two is 1 and so forth. To get it to reflect the actual page number, where the
> > first page is page 1, simply use
> >
> > CurrentPage = Me.TabControlName + 1
> >
> > --
> > There's ALWAYS more than one way to skin a cat!
> >
> > Answers/posts based on Access 2000/2003
> >
> > Message posted via AccessMonster.com
> > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1
> >
> >
Re: Current page selected
Akilah 12/12/2008 5:12:01 PM
Ok, but is there a way to get the old page #. Thanks again.

"Dale Fye" wrote:

[Quoted Text]
> if you check for the value of the tabcontrol in the controls Change event, it
> will give you the new page #, not the one you moved from.
>
> --
> HTH
> Dale
>
> email address is invalid
> Please reply to newsgroup only.
>
>
>
> "Akilah" wrote:
>
> > Thanks. Now that tells the page that is currently selected. Is there a way
> > to tell what page it is changing to on the tab.change. For instance, if I go
> > from page1 to page3, the current page is page1; how can I get the value of
> > page 3.
> >
> > "Linq Adams via AccessMonster.com" wrote:
> >
> > > CurrentPage = Me.TabControlName.Value
> > >
> > > or simply
> > >
> > > CurrentPage = Me.TabControlName
> > >
> > > Remembering that the index is Zero-based, i.e. page one's value is 0, page
> > > two is 1 and so forth. To get it to reflect the actual page number, where the
> > > first page is page 1, simply use
> > >
> > > CurrentPage = Me.TabControlName + 1
> > >
> > > --
> > > There's ALWAYS more than one way to skin a cat!
> > >
> > > Answers/posts based on Access 2000/2003
> > >
> > > Message posted via AccessMonster.com
> > > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1
> > >
> > >
Re: Current page selected
Dale Fye 12/12/2008 5:33:08 PM
Not that I'm aware of, but you could create a public variable that is visible
to the entire form. In the declarations portion of the code, enter:

Dim intPrevPage as integer

This variables initial value will be set to zero, since it is numeric.
Whenever I use a tab control, I generally use the Forms Current event to
reset the focus of the tab control to the first tab. I would reset
intPrevPage to zero at that time as well.

Then, at the end of the code in the Change Event of the tab control, set
that value to the current value. Then, you can refer to that value anywhere
in your code for that form.

--
HTH
Dale

email address is invalid
Please reply to newsgroup only.



"Akilah" wrote:

[Quoted Text]
> Ok, but is there a way to get the old page #. Thanks again.
>
> "Dale Fye" wrote:
>
> > if you check for the value of the tabcontrol in the controls Change event, it
> > will give you the new page #, not the one you moved from.
> >
> > --
> > HTH
> > Dale
> >
> > email address is invalid
> > Please reply to newsgroup only.
> >
> >
> >
> > "Akilah" wrote:
> >
> > > Thanks. Now that tells the page that is currently selected. Is there a way
> > > to tell what page it is changing to on the tab.change. For instance, if I go
> > > from page1 to page3, the current page is page1; how can I get the value of
> > > page 3.
> > >
> > > "Linq Adams via AccessMonster.com" wrote:
> > >
> > > > CurrentPage = Me.TabControlName.Value
> > > >
> > > > or simply
> > > >
> > > > CurrentPage = Me.TabControlName
> > > >
> > > > Remembering that the index is Zero-based, i.e. page one's value is 0, page
> > > > two is 1 and so forth. To get it to reflect the actual page number, where the
> > > > first page is page 1, simply use
> > > >
> > > > CurrentPage = Me.TabControlName + 1
> > > >
> > > > --
> > > > There's ALWAYS more than one way to skin a cat!
> > > >
> > > > Answers/posts based on Access 2000/2003
> > > >
> > > > Message posted via AccessMonster.com
> > > > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1
> > > >
> > > >
Re: Current page selected
Akilah 12/12/2008 6:01:02 PM
I'll try that, thanks.

"Dale Fye" wrote:

[Quoted Text]
> Not that I'm aware of, but you could create a public variable that is visible
> to the entire form. In the declarations portion of the code, enter:
>
> Dim intPrevPage as integer
>
> This variables initial value will be set to zero, since it is numeric.
> Whenever I use a tab control, I generally use the Forms Current event to
> reset the focus of the tab control to the first tab. I would reset
> intPrevPage to zero at that time as well.
>
> Then, at the end of the code in the Change Event of the tab control, set
> that value to the current value. Then, you can refer to that value anywhere
> in your code for that form.
>
> --
> HTH
> Dale
>
> email address is invalid
> Please reply to newsgroup only.
>
>
>
> "Akilah" wrote:
>
> > Ok, but is there a way to get the old page #. Thanks again.
> >
> > "Dale Fye" wrote:
> >
> > > if you check for the value of the tabcontrol in the controls Change event, it
> > > will give you the new page #, not the one you moved from.
> > >
> > > --
> > > HTH
> > > Dale
> > >
> > > email address is invalid
> > > Please reply to newsgroup only.
> > >
> > >
> > >
> > > "Akilah" wrote:
> > >
> > > > Thanks. Now that tells the page that is currently selected. Is there a way
> > > > to tell what page it is changing to on the tab.change. For instance, if I go
> > > > from page1 to page3, the current page is page1; how can I get the value of
> > > > page 3.
> > > >
> > > > "Linq Adams via AccessMonster.com" wrote:
> > > >
> > > > > CurrentPage = Me.TabControlName.Value
> > > > >
> > > > > or simply
> > > > >
> > > > > CurrentPage = Me.TabControlName
> > > > >
> > > > > Remembering that the index is Zero-based, i.e. page one's value is 0, page
> > > > > two is 1 and so forth. To get it to reflect the actual page number, where the
> > > > > first page is page 1, simply use
> > > > >
> > > > > CurrentPage = Me.TabControlName + 1
> > > > >
> > > > > --
> > > > > There's ALWAYS more than one way to skin a cat!
> > > > >
> > > > > Answers/posts based on Access 2000/2003
> > > > >
> > > > > Message posted via AccessMonster.com
> > > > > http://www.accessmonster.com/Uwe/Forums.aspx/access-formscoding/200812/1
> > > > >
> > > > >

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net