|
-
Feb 16th, 2007, 08:06 AM
#1
Thread Starter
Junior Member
Print Function
i need help with printing the labels of a form but nothing else can anyone help
-
Feb 16th, 2007, 08:09 AM
#2
Re: Print Function
Labels as in standard VB labels?
How many labels?
How to you want them to appear on your printed report?
-
Feb 16th, 2007, 08:12 AM
#3
Thread Starter
Junior Member
Re: Print Function
there are 6 standard labels 3 with the names of the items in the other 3 and would like them columed
-
Feb 16th, 2007, 08:17 AM
#4
Re: Print Function
Ok. Here is how you would print one label
VB Code:
Private Sub Command1_Click()
Printer.Print Label1.Caption
Printer.EndDoc
End Sub
Now, in order to print all 6 at the same time you would need to do some looping. How would do that looping depends on whether or not they are in a control array. Are they?
-
Feb 16th, 2007, 08:23 AM
#5
Thread Starter
Junior Member
-
Feb 16th, 2007, 08:41 AM
#6
Re: Print Function
Try this
VB Code:
Private Sub Command1_Click()
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeOf ctrl Is Label Then
Printer.Print ctrl.Caption
End If
Next
Printer.EndDoc
End Sub
It will at least get you started.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|