473,407 Members | 2,546 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Which page am I on?

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?
Nov 13 '05 #1
8 2014
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
Nov 13 '05 #2

"Trevor Best" <no****@besty.org.uk> wrote in message
news:41**********************@news.zen.co.uk...
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?

Nov 13 '05 #3
>>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
Nov 13 '05 #4
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
Nov 13 '05 #5
Daven Thrice wrote:
"Trevor Best" <no****@besty.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
Nov 13 '05 #6
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 :-)

--
This intentionally left blank sig
Nov 13 '05 #7

"Trevor Best" <no****@besty.org.uk> wrote in message
news:41**********************@news.zen.co.uk...
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.
Nov 13 '05 #8
Daven Thrice wrote:
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
Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: Rabbit63 | last post by:
Hi: I want to show a set of records in the database table on the clicnt browser. I have two ways to do this (writen in JScript): 1.The first way is: <% var sql = "select firstname from...
133
by: Jane Withnolastname | last post by:
I have a web page that uses an unordered list (<UL>) and the LH (list header) tag. I know LH is a valid tag because it is clearly defined by the W3C here:...
0
by: pmud | last post by:
Hi, An ASP.NET project has been DEPLOYED to the WEB SERVER. I modified one of the pages in the DEVELOPMENT SERVER & tried to replace the Existing page in the project (which has already been...
1
by: Tomas | last post by:
Is there any sequence diagram on the web that clearly shows in which order all Page methods (load, render and so on) are being called compared to the order the page's contained control methods are...
0
by: djus | last post by:
Hello At the begining I'm sorry for my English :( I want my aspx page TestPage.aspx to inherit from MyClass2. MyClass2 inherits from MyMainClass which is subtype of Page: public class...
2
by: Nelson | last post by:
Here is the discussion that is already discussed that I am looking for. After visiting the link below I am getting the following code. My question is in which client side script event I can set the...
5
by: rAinDeEr | last post by:
Hi, I have a web application with a table to store terms and conditions of a Company. This may some times run into many pages and some times it may be just a few sentences. It is a character...
2
by: Jeff | last post by:
ASP.NET 2.0 In my webproject I've created a page which contain a button. This page will be opened from 2 pages. This button must be invisible if the page it is placed on are opened from one of...
10
by: paulie | last post by:
Hi, I have been experiencing an issue when trying to use AJAX to reload a DIV area using a timer of 2000ms, which contains a html page with another DIV and javascript. Scenario -------------...
1
by: dotnetdev1 | last post by:
Hi Friends, I am new to Coding. And I started my Project recently in which they are following a framework. In that framework Login page was already created and I have to continue...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.