|
-
Jan 14th, 2000, 12:29 PM
#1
Thread Starter
Hyperactive Member
-
Jan 14th, 2000, 12:36 PM
#2
You definitely need to upgrade to at least VB5..
As the other methods we've suggested don't seem to have worked for you, lets try accessing the Data directly from the Access DB and forget the Grid, ie.
Code:
Private Sub Command1_Click()
Dim oDB As Database
Dim oRS As Recordset
Dim iField As Integer
Set oDB = OpenDatabase("C:\Files\Db1.mdb")
Set oRS = oDB.OpenRecordset("SELECT * FROM MyTable", dbOpenForwardOnly)
While Not oRS.EOF
For iField = 0 To oRS.Fields.Count - 1
Printer.Print oRS(iField) & " ";
Next
Printer.Print
oRS.MoveNext
Wend
Printer.EndDoc
oRS.Close
oDB.Close
MsgBox "All Done", vbInformation, "Print Data"
End Sub
This may need some Formatting, but at least it will get it out onto the Printer.
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Jan 14th, 2000, 12:49 PM
#3
Besides upgrading to VB5 or 6, he will need to use MSFlexGrid (or some third party grid) rather than the MS Grid control he is now using. When I first saw his question I thought the answer would be a simple MyForm.PrintForm which (after hiding the other non-Grid objects) works just fine in one of my projects that uses a flex grid. When I tried it with the old MS Grid however, the contents of the grid did not show up.
------------------
Marty
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
|