|
-
Jan 10th, 2000, 12:41 PM
#1
Thread Starter
Hyperactive Member
English:
There is a grid filled by an Access 1.10 database and I want to print it out on the
printer, but with the method I know the printer only gives out an empty paper:
Printer.Print Grid1
Printer.EndDoc
How must I write the code (in VB3, but normally this doesn't matter)
Thanks for some help, Matthias
Deutsch:
Die Tabelle in meier Form wird über Access 1.10 gefüllt und nun möchte ich die
Ergebnisse ausdrucken, aber mit der Methode die ich kenne (s.o.), kommt nur ein leeres Blatt.
Was muß ich hier tun (VB3)
Danke für ein paar Tips, Matthias
-
Jan 10th, 2000, 12:47 PM
#2
I'll assume you're using a Databound Grid..
The easiest method would probably be just to traverse the underlying Recordset and print the Data directly from there, something like:
Code:
Private Sub Command1_Click()
Dim X As Integer
Dim Y As Integer
Printer.FontName = "Courier"
With Data1.Recordset
For Y = 0 To .RecordCount - 1
For X = 0 To .Fields.Count - 1
Printer.Print .Fields(X).Value; " ";
Next
Printer.Print
Next
End With
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
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
|