Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mulit-Page Form

Status
Not open for further replies.

ncotton

IS-IT--Management
Jan 27, 2006
2,841
0
0
GB
I have a form, with two pages.

If I create a object on Page 1, then it appears on Page one, and switching to Page 2 leaves the page blank.

HOWEVER

If I put an object on Page 1, then Copy and paste it (AGAIN onto Page 1), change ALL of it's properties.... so now I have two text boxes, one called box1 and one called box2.

When I switch to Page 2, box 2 appears.

It is not a property of the box, so I assume it must be a property of the form that says this object appears at this location. How can I stop this?

Neil J Cotton
Technical Consultant
Anix Group Ltd
 
A form doesn't have pages.... are you referring to a tab control?

Max Hugen
Australia
 
How are ya ncotton . . .

By chance is Box2 on or after the PageBreak?

If not, sounds like some kind of corruption! . . .

Calvin.gif
See Ya! . . . . . .

Be sure to see FAQ219-2884:
 
A form does have pages. you can overlay different pages inside a single form.

Neil J Cotton
Technical Consultant
Anix Group Ltd
 
Are you referring to subform controls?

Max Hugen
Australia
 
No...no subform controls and not after a page break.

In design mode, if you right click on the forms main area, you get an option to Add/Remove a "Page", you then toggle the Page Order as to which page is displayed, then use a Event Command on a button to switch pages.

It doesn't matter now anyway, I re-did it all from scratch.... it was dodgily designed system anyway.

Neil J Cotton
Technical Consultant
Anix Group Ltd
 
Is that a new feature in Access 2007?

Max Hugen
Australia
 
That feature has been there since A97 or before.
 
Thanks, yes I can put a tab control on the form, but the conversation seemed to imply one puts the cursor in the centre of the form, right clicks and uses the add page.

Have a good weekend, thought I was missing something.
 
if you right click on the forms main area, you get an option to Add/Remove a "Page"

Neil, this applies only for a tab control, so you must have one on your form.

This would explain your original question. If you paste a control into a 'page' of a tabcontrol, it will appear only in that page. However, it's also possible to put other controls 'on top' of the tab control itself, so it will then seem to appear on every page.

This is useful at times... for example, a close button that you want to see on each page. To do this, add a button outside of the tab control, then drag it onto the control.

Max Hugen
Australia
 
Max and ZOR,
You do seem to be missing something. You may have never used this feature, but most definately you can make a multi page form using a page-break control (this has nothing to do with a tab control) and this feature has been around at least since Access 2. This is from the A2K help file, and according to the original link I posted you have this feature in A2003.

A form with page breaks

You use a page break control to mark a horizontal break between controls on a form. A page break is active in Form view only when the DefaultView property of the form is set to Single Form.

In Form view, pressing the PAGE UP or PAGE DOWN keys will scroll the form to the page before or after the page break control. When a form is printed, a page break marks the start of a new page within a section.

How to make a multi page form using a page break control:

Open the form in Design view.
Click the Page Break tool in the toolbox.
Click where you want to place the page break. Place the page break above or below a control to avoid splitting data in that control.
Microsoft Access marks the page break on the left border of the form with a short dotted line.

Note If you want each page to be the same size and each window to show only one page at a time, design the form so that each page break is an equal distance from the other. You can do this by positioning the page break controls with the vertical ruler.

Double-click the form selector to open the property sheet, and click Current Page in the Cycle property box. This will prevent the user from moving to the next page by pressing the TAB key.
Remove the vertical scroll bar by setting the ScrollBars property to Horizontal Only or Neither.
Switch to Form view to test the form and size it so you can only see one page at a time. You can press the PAGE DOWN or PAGE UP keys to move between pages.
Note You might want to add a command button to each page that users can use to move the focus to the next or previous page.
Hope this cleared up the confusion. I think you can see some examples of the use of this control in the sample Northwind database. I know there is an example in the address book template that ships with Access.
 
MajP, you don't have the option to "click on the forms main area, you get an option to Add/Remove a Page" by using page breaks... only in a tabcontrol.

Max Hugen
Australia
 
Max, you have the option in the property sheet of each form's section ...
 
Hmmm... I looked at this in A2000, created new form, added a page break in the Detail section... in the detail's prop sheet I see options to 'Force New Page' [before/after section] etc, but not Add/Remove page ???

Max Hugen
Australia
 
Besides, Properties wouldn't include Methods such as "Add page", surely? From Neil's orig question, I still think he was in a tabcontrol...
 
nCotton
Ive had this problem where I have copied a control from one page of a tab control and pasted onto page 2. Suddenly the copy is there on page one and two (and on any other pages you may create subsequently). I no longer have the problem by copying and pasting as follows:

1. Copy the item you need from page one
2. Select page 2, click on it to make sure it is selected (look for the selection handles in black round the page - this is important) then paste by way of the right click - paste command. I think you may find the items appear on multiple pages using other paste methods or when not having the selection handles displayed. Can't tell you why but just that this works!!
 
Thats the normal method to paste onto a tab control.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top