Wrox Programmer Forums
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 8th, 2006, 03:42 PM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default Form Paging

Hi ,
I have i form in design view and it can contain only one page , but i want to add few pages to the form . how can i do that?

 
Old April 8th, 2006, 04:08 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

The PageBreak control is a standard Toolbox control. Just drop one on your form where you want the next page page begin. Then place previous page and next page Command Buttons in each page section of the form as appropriate, and navigate betweeen pages with code like:

Code:
Private Sub cmdNextPage12_Click()
    DoCmd.GoToPage 2
End Sub

Private Sub cmdNextPage23_Click()
    DoCmd.GoToPage 3
End Sub

Private Sub cmdPreviousPage31_Click()
    DoCmd.GoToPage 1
End Sub
HTH,

Bob

 
Old April 9th, 2006, 06:48 AM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

But how do i create the separate pages???it allows me to create only one page.

 
Old April 9th, 2006, 09:25 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

You work with the single form at design-time, but the PageBreak control breaks the form up into multiple pages at run-time.

Unless you're talking about Tab Control pages.

To create multiple pages with the PageBreak control, place a few control on a form, add a page break control. That'll display page on at run-time. On the same form in design-view add come more controls. Then add another PageBreak control. Everyyhing between the first and second page break control will display as page 2 at run-time, etc...etc...

Bob

 
Old April 9th, 2006, 11:41 AM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

The Page Break control doesn't seem to work at all . It doesn't separate the pages , and if i add buttons , it also doesn't help.

 
Old April 9th, 2006, 05:36 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,093
Thanks: 1
Thanked 12 Times in 11 Posts
Default

The form has to be minimized. For example, if you set the page break control 3" down the form, you can only display a 3" form. In fact, you should set the Max Min Buttons property to none so that it can't be maximized. Save the form in design view, close it, then double click the form to open it to its display size. You might find a Tab Control with multiple pages suits you better. Play around with both and see.

Bob

 
Old April 10th, 2006, 06:03 AM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks , it worked , but this is not what i wanted :

i don't need logical separation of pages to separate pages . I need that it will be actually seen (and not only in Print Preview) . I just need to enlarge the page height from 22'' to something larger , and it dont allow me . And 22'' it's 2.5 normal pages . I don't understand the logic behind this....

 
Old April 10th, 2006, 06:10 AM
Authorized User
 
Join Date: Feb 2006
Posts: 66
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I guess that there is no other way than the Tab Control.......

 
Old April 12th, 2006, 09:26 AM
Friend of Wrox
 
Join Date: Sep 2003
Posts: 155
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to leehambly
Default

Paula,

Not sure I understand exactly.. but will have a go at helping!?

You have a FORM that you are displaying data on and also printing...
You want the data to spill from one page of the FORM on to "other instances" (ie: pages) of the same form, as the form is filled to the end?
So, am I right in thinking this form is a CONTINUOUS form?

I think this is going to be possible... but would reckon it is only possible with a class form and some quite intensive coding to get to that point... ie: to be able to know when the form has been filled.. but also it will need to identify things such as screen resolution, font size, list size (if you have any) etc, etc...

Some questions:

Why are you printing out a FORM?
Would a REPORT not be more suitable?
Are the form PAGES all, in principle, showing the same data? Or is the data on the PAGES of the FORM different? Basically, is the second page of the FORM there because the first page isnt big enough to hold all the data OR is it because the second page contains entirely different fields for the record...

Sorry, trying to understand the problem you have, and why you have it?





Similar Threads
Thread Thread Starter Forum Replies Last Post
DB recordset paging using ajax paging? kumiko Classic ASP Basics 0 May 26th, 2008 10:23 AM
Paging fadyratl VB Databases Basics 0 December 27th, 2006 05:04 AM
DataGrid Paging nsrujan C# 0 February 6th, 2006 09:12 AM
Database paging zhuge_liang Classic ASP Basics 1 April 23rd, 2004 03:34 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.