473,382 Members | 1,171 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,382 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 9475
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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...
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...

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.