473,396 Members | 1,866 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,396 software developers and data experts.

Automatic move to next Access tab page

I'm using Access 2002. My database is in Access 2000 format.

I'm designing a form to collect responses to a 40-item questionnaire.
I can fit four list boxes on a screen, so I plan to have 11 tab pages
(one page at the end for collecting identifying information) on my
form. To ease the task for the user, I'd like to have an automatic
movement to the next page. For instance, when the user clicks on the
choice for Question 4 (the last of the items on Page1), the focus
automatically shifts to Question 5 (the first of the items on Page2).

I know about entering code as an event procedure. I assume that I need
to enter code on the Event tab for the List Box that contains the
Question 4 answer.

1. For which Event do I enter the code (After Update, On Enter, On
Click)?

2. What code should I enter?

3. Can I use this same method for all of the moves from one page to
the next? (I know how to set a command to close the form. My plan is
to have a command button on the last page that says, "You may review
your answers by clicking on the tabs. When you are done, click on the
button to close the form.")

Thanks so much!Cathy
Nov 12 '05 #1
4 9478
On Tue, 27 Jan 2004 01:23:03 GMT, Vincent Yang wrote:
I'm using Access 2002. My database is in Access 2000 format.

I'm designing a form to collect responses to a 40-item questionnaire.
I can fit four list boxes on a screen, so I plan to have 11 tab pages
(one page at the end for collecting identifying information) on my
form. To ease the task for the user, I'd like to have an automatic
movement to the next page. For instance, when the user clicks on the
choice for Question 4 (the last of the items on Page1), the focus
automatically shifts to Question 5 (the first of the items on Page2).

I know about entering code as an event procedure. I assume that I need
to enter code on the Event tab for the List Box that contains the
Question 4 answer.

1. For which Event do I enter the code (After Update, On Enter, On
Click)?

2. What code should I enter?

3. Can I use this same method for all of the moves from one page to
the next? (I know how to set a command to close the form. My plan is
to have a command button on the last page that says, "You may review
your answers by clicking on the tabs. When you are done, click on the
button to close the form.")

Thanks so much!Cathy


First off, I use a program at my work that does something similar and it is
extremely annoying. Just because I have chosen something for that field,
does not necessarily mean I'm done with the tab or page.

If that is still what you want to do, you can move to a different tab by
using the SetFocus method of the tab page you want to move to. In the
AfterUpdate event of the last control on the page, use
Me!TabControlName.Pages("PageName").SetFocus
This is assuming there are no subforms to drill down through to get to the
tab control. This same line can be used each time it is needed. Just change
the page name to move to.

--
Mike Storr
veraccess.com
Nov 12 '05 #2
tom
Cathy,

I agree with Mike that automatically moving them could be confusing
and annoying to the user. How about only showing one question at a
time and providing a big [Next Question -->] button? (You could also
provide some other navigation buttons like "Previous", "First",
"Last", and "Jump" (which would give the user a list of the question
names to pick from).

If you do go with tabs, I believe you can change the current page of
a tab by setting its value property, like so: Me.TabControl.Value =
Me.TabControl.Value + 1.

If you don't use a tab control, you'll have to do some showing and
hiding of controls, which will be a bit of a headache to setup.
Whichever way you go, you may want to only populate the listboxes and
so forth for the controls that are currently visible so you don't run
into headaches with resources.

-Tom
Mike Storr <st******@sympatico.ca> wrote in message news:<16****************************@40tude.net>.. .
On Tue, 27 Jan 2004 01:23:03 GMT, Vincent Yang wrote:
I'm using Access 2002. My database is in Access 2000 format.

I'm designing a form to collect responses to a 40-item questionnaire.
I can fit four list boxes on a screen, so I plan to have 11 tab pages
(one page at the end for collecting identifying information) on my
form. To ease the task for the user, I'd like to have an automatic
movement to the next page. For instance, when the user clicks on the
choice for Question 4 (the last of the items on Page1), the focus
automatically shifts to Question 5 (the first of the items on Page2).

I know about entering code as an event procedure. I assume that I need
to enter code on the Event tab for the List Box that contains the
Question 4 answer.

1. For which Event do I enter the code (After Update, On Enter, On
Click)?

2. What code should I enter?

3. Can I use this same method for all of the moves from one page to
the next? (I know how to set a command to close the form. My plan is
to have a command button on the last page that says, "You may review
your answers by clicking on the tabs. When you are done, click on the
button to close the form.")

Thanks so much!Cathy


First off, I use a program at my work that does something similar and it is
extremely annoying. Just because I have chosen something for that field,
does not necessarily mean I'm done with the tab or page.

If that is still what you want to do, you can move to a different tab by
using the SetFocus method of the tab page you want to move to. In the
AfterUpdate event of the last control on the page, use
Me!TabControlName.Pages("PageName").SetFocus
This is assuming there are no subforms to drill down through to get to the
tab control. This same line can be used each time it is needed. Just change
the page name to move to.

Nov 12 '05 #3
Or use the event on exiting the last component if the user may not
have changed it's data.

Mike Storr <st******@sympatico.ca> wrote in message news:<16****************************@40tude.net>.. .
On Tue, 27 Jan 2004 01:23:03 GMT, Vincent Yang wrote:
I'm using Access 2002. My database is in Access 2000 format.

I'm designing a form to collect responses to a 40-item questionnaire.
I can fit four list boxes on a screen, so I plan to have 11 tab pages
(one page at the end for collecting identifying information) on my
form. To ease the task for the user, I'd like to have an automatic
movement to the next page. For instance, when the user clicks on the
choice for Question 4 (the last of the items on Page1), the focus
automatically shifts to Question 5 (the first of the items on Page2).

I know about entering code as an event procedure. I assume that I need
to enter code on the Event tab for the List Box that contains the
Question 4 answer.

1. For which Event do I enter the code (After Update, On Enter, On
Click)?

2. What code should I enter?

3. Can I use this same method for all of the moves from one page to
the next? (I know how to set a command to close the form. My plan is
to have a command button on the last page that says, "You may review
your answers by clicking on the tabs. When you are done, click on the
button to close the form.")

Thanks so much!Cathy


First off, I use a program at my work that does something similar and it is
extremely annoying. Just because I have chosen something for that field,
does not necessarily mean I'm done with the tab or page.

If that is still what you want to do, you can move to a different tab by
using the SetFocus method of the tab page you want to move to. In the
AfterUpdate event of the last control on the page, use
Me!TabControlName.Pages("PageName").SetFocus
This is assuming there are no subforms to drill down through to get to the
tab control. This same line can be used each time it is needed. Just change
the page name to move to.

Nov 12 '05 #4
"Mike Storr" <st******@sympatico.ca> wrote in message
news:16****************************@40tude.net...
On Tue, 27 Jan 2004 01:23:03 GMT, Vincent Yang wrote:
I'm using Access 2002. My database is in Access 2000 format.

I'm designing a form to collect responses to a 40-item questionnaire.
I can fit four list boxes on a screen, so I plan to have 11 tab pages
(one page at the end for collecting identifying information) on my
form. To ease the task for the user, I'd like to have an automatic
movement to the next page. For instance, when the user clicks on the
choice for Question 4 (the last of the items on Page1), the focus
automatically shifts to Question 5 (the first of the items on Page2).

I know about entering code as an event procedure. I assume that I need
to enter code on the Event tab for the List Box that contains the
Question 4 answer.

1. For which Event do I enter the code (After Update, On Enter, On
Click)?[snip]


IMO the best way to do this is to place a TextBox as the last item in the
TabOrder on each page. It is unbound and you make it so small and color it
so that it is effectively rendered invisible (but the visible property is
still true).

In this control's GotFocus event you have a line of code that sets focus to
the next desired control on the next desired TabPage. The only way that
this TextBox will ever get focus is by exiting out of the last "real"
control on your page by using <Tab> or <Enter> which is when the user will
logically want to go to the next page.

Any other method and you run the risk of overriding the user's wishes. If
they use their mouse or <Shift-Tab> to move to a different control your
code will kick in and take them someplace that they didn't want to go.
This would be confusing, irritating, and would not reflect well on the
developer of the application.
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com


Nov 12 '05 #5

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

Similar topics

0
by: Kim Skytte | last post by:
I have developed a Data access page in access 2002. I want to deploy it on my webserver ( IIS 5.1). However i get an error with the connection string to the database. In the source of my data...
0
by: Manystrengths | last post by:
I must warn all of you willing to help me that this is my first go at designing a functional data access page. Please bear in mind that we all start somewhere so if I should be asking the absolute...
0
by: consulttech2004 | last post by:
Folks, Someone I know is using Microsoft Access 2003 to create a Data Access Page. They have inserted a Quick Time Movie. When they view the page (the HTML version of the page) and run the...
2
by: Anand Ganesh | last post by:
Hi All, How to Implement Move Next, Move Previous, Last Record and First Record in a DataGrid Control ? Is there any standard tool available in the tool box button? Thanks for your time. ...
0
by: Spencer Lee | last post by:
I have encountered a very unique problem (for me): I created a data access page, with 3 levels of groups. I put the file on the web folder (intranet), and it seems like everything is working...
55
by: indhu | last post by:
HI all one sequence has many panels. when i select combo it displays all the fields but panel has more rows. i want to view that also. how to do that? move next and previous commds are there...
4
by: Trunk3d | last post by:
Hello all. I have a Data Access Page that users can reach to submit a request. At the end of the page I am using a Command Button that is set to Save Record. Is there a way that upon pressing the...
3
by: dianaj86 | last post by:
I have multiple dropdownlists each one filled with values from a specific column in the table. Also I have multiple textboxes corresponding to dropdownlists. For example, when I select an item from...
3
by: Raj Kumar | last post by:
hi i am a begineer in javascript... is it possible to move image one page to next page using drag and drop
1
by: Boozehound | last post by:
Hi, I've created a data access page for staff to verify their permissions on one of our systems. A section of the page has a list of permissions and whether it is currently available to them...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.