Solved

Flexibility of Printform, Printing Mulitple forms and Forms with Tabs

Posted on 2004-08-02
1
180 Views
Last Modified: 2010-05-02
I have used the Printform command in VB before.  It works very well for printing the screen currently displayed.  Is there any flexibility in this command?  For example can I set up some code that will print multiple forms without making the user open the form, click the "print' button (which executes the Printfrom), close the form and repeat as many times as their are forms.  I would like them to be able to print a group of forms with 'one click'.  

Also I have a form set up using Tabbed Dialog Controls.  Is there any way to have a 'one click' solution to printing all of the tab panels, each panel on a seperate page.  I know that the user can click on each tab individually and then print it but once again I am looking for convenience for the user.

Any help would be greatly appreciated.
0
Comment
Question by:mlcktmguy
1 Comment
 
LVL 19

Accepted Solution

by:
Shauli earned 125 total points
Comment Utility
You dont need to open the forms you want to print using printform.  And, yes, you can print the SSTab tabs as well. See below an example:

Private Sub Command1_Click()
Dim c As Integer
Form1.PrintForm
Form2.PrintForm
For c = 0 To Form3.SSTab1.Tabs - 1
    Form3.SSTab1.Tab = c
    Form3.PrintForm
Next c
End Sub

In this example you cal form2 and form3 from a command button in form1, and loop among the tabs on form3.

S
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now