dbTalk Databases Forums  

Which page am I on?

comp.databases.ms-access comp.databases.ms-access


Discuss Which page am I on? in the comp.databases.ms-access forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Adrian
 
Posts: n/a

Default Which page am I on? - 11-29-2004 , 05:33 PM






Hello,

I have a form with two pages - that is, the height of the form is
about two screen heights and it has a PageBreak half way down.

I move between the pages with:

Me.GoToPage 1
and
Me.GoToPage 2

The user will select the page from a button on a custom CommandBar

How can I get VBA to tell me which page is currently being displayed?
I cannot find a property like "CurrentPage". All the properties to do
with pages seem to relate to pages on Tab Controls. If there was a
"CurrentPage" property, I could use code like:

If Me.CurrentPage = 1 Then
Do something
Else
Do something different
End If

Is there a way to achieve the result I want?

Reply With Quote
  #2  
Old   
Trevor Best
 
Posts: n/a

Default Re: Which page am I on? - 11-29-2004 , 07:38 PM






Adrian wrote:
Quote:
Hello,

I have a form with two pages - that is, the height of the form is
about two screen heights and it has a PageBreak half way down.

I move between the pages with:

Me.GoToPage 1
and
Me.GoToPage 2

The user will select the page from a button on a custom CommandBar

How can I get VBA to tell me which page is currently being displayed?
I cannot find a property like "CurrentPage". All the properties to do
with pages seem to relate to pages on Tab Controls. If there was a
"CurrentPage" property, I could use code like:

If Me.CurrentPage = 1 Then
Do something
Else
Do something different
End If

Is there a way to achieve the result I want?
If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then
Page=1
else
Page=2
end if

--
This sig left intentionally blank


Reply With Quote
  #3  
Old   
Daven Thrice
 
Posts: n/a

Default Re: Which page am I on? - 11-30-2004 , 02:43 AM




"Trevor Best" <nospam (AT) besty (DOT) org.uk> wrote

Quote:
Adrian wrote:
Hello,

I have a form with two pages - that is, the height of the form is
about two screen heights and it has a PageBreak half way down.

I move between the pages with:
Me.GoToPage 1
and
Me.GoToPage 2

The user will select the page from a button on a custom CommandBar

How can I get VBA to tell me which page is currently being displayed? I
cannot find a property like "CurrentPage". All the properties to do
with pages seem to relate to pages on Tab Controls. If there was a
"CurrentPage" property, I could use code like:

If Me.CurrentPage = 1 Then
Do something
Else
Do something different
End If

Is there a way to achieve the result I want?

If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then
Page=1
else
Page=2
end if

--
This sig left intentionally blank
That should be, "This sig intentionally left blank", should it not?





Reply With Quote
  #4  
Old   
Bas Cost Budde
 
Posts: n/a

Default Re: Which page am I on? - 11-30-2004 , 07:16 AM



Quote:
This sig left intentionally blank

That should be, "This sig intentionally left blank", should it not?
As I see it mostly:

This page left blank unintentionally

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea


Reply With Quote
  #5  
Old   
Adrian
 
Posts: n/a

Default Re: Which page am I on? - 11-30-2004 , 03:19 PM



Trevor,

'If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then
' Page = 1
'Else
' Page = 2
'End If

Many thanks for this ingenious response.

It was not my intention to start a thread about the position of adverbs.


Adrian

Reply With Quote
  #6  
Old   
Trevor Best
 
Posts: n/a

Default Re: Which page am I on? - 11-30-2004 , 05:30 PM



Daven Thrice wrote:
Quote:
"Trevor Best" <nospam (AT) besty (DOT) org.uk> wrote in message

--
This sig left intentionally blank


That should be, "This sig intentionally left blank", should it not?
Nah!

--
This blank sig left intentionally


Reply With Quote
  #7  
Old   
Trevor Best
 
Posts: n/a

Default Re: Which page am I on? - 11-30-2004 , 05:32 PM



Adrian wrote:
Quote:
Trevor,

'If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then
' Page = 1
'Else
' Page = 2
'End If

Many thanks for this ingenious response.

It was not my intention to start a thread about the position of adverbs.
Don't sweat it :-)

--
This intentionally left blank sig


Reply With Quote
  #8  
Old   
Daven Thrice
 
Posts: n/a

Default Re: Which page am I on? - 12-01-2004 , 12:31 PM




"Trevor Best" <nospam (AT) besty (DOT) org.uk> wrote

Quote:
Adrian wrote:
Trevor,

'If Screen.ActiveControl.Top < Me.PageBreakControl.Top Then
' Page = 1
'Else
' Page = 2
'End If

Many thanks for this ingenious response.

It was not my intention to start a thread about the position of adverbs.

Don't sweat it :-)
I guess we're just syntactical folks.




Reply With Quote
  #9  
Old   
Bas Cost Budde
 
Posts: n/a

Default Re: Which page am I on? - 12-01-2004 , 12:47 PM



Daven Thrice wrote:

Quote:
I guess we're just syntactical folks.
SELECT NP FROM B* ORDER BY adv

--
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.