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 September 23rd, 2007, 09:57 PM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Print 2 Forms using 1 Button

Hello, I am new to Microsoft Access and I have a couple of instructional books on it. What I am trying to do is be able to print two separate forms using one button. What I had to do is create an interactive form, but the form had too many options, so I had to split it into two separate forms. The forms will need to be printed after completion, and I was just wondering if anyone has any way that I can just attach one print button to pg. 2 and have it print both the first and second page. Thanks for your help!

Matt

 
Old September 24th, 2007, 08:22 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You are printing forms? Are they both open at the same time? When you say "pg 2," do you mean that you have a tabbed form? Or two seperate forms? Why not print a report based on the information on the two forms?

mmcdonal
 
Old September 24th, 2007, 08:55 PM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

hmm.. I haven't thought about this. I guess that's kind of elementary. It is not a tabbed form, but two separate forms. I guess I should try the report route, that may be easiest.

 
Old September 24th, 2007, 08:55 PM
Registered User
 
Join Date: Sep 2007
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Though about that, sorry, typo.

 
Old September 26th, 2007, 07:36 AM
Friend of Wrox
 
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

You can take some query or value from the form, and then package the report using the value. For example, create a query that has all customers plus all their outstanding orders, let's say. Then take their customer number from the form, and run the report WHERE [CustomerNo] = Me.CustomerNo. You can either pass the parameter to the report on the DoCmd.OpenReport where clause, or you can create a query that has this in the Criteria line for the field you are passing (CustomerNo in this case):

[Forms]![frmMyCustomerForm].[txtMyCustomerNoField]

Did any of that help?


mmcdonal





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to print from windows forms?? tycotrix C# 1 January 11th, 2007 09:45 AM
Print Forms on Saperate Pages itHighway HTML Code Clinic 1 November 21st, 2005 08:04 AM
'print' button crmpicco Classic ASP Basics 0 February 8th, 2005 10:25 AM
view/print report from 2 different forms chacquard Access VBA 3 January 5th, 2005 10:00 PM
print button alitoday Classic ASP Basics 1 June 5th, 2004 05:01 AM





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