Hi Alsayegh -
Have you tried PrintForm ?
If that does not show the detail.... try the following code
... I have used it to print contents of a MSFlexGrid
- Add a Picture control to your grid form
- set visible to FALSE
Please reply back to this forum to tell me if this
worked for you.
John
Private Sub btnPrintGrid_Click()
'When the form contains a M$FlexGrid, the usual way of printing a form, the PrintForm method,
'will result in no grid data showing on the print-out.
'Sooo... this sub copies the grid image to a Picture control,
'then sends the Picture control to the printer.
'It works surprisingly well and is much easier than exporting
'data to an Excel worksheet for the purpose of printing.
'Note: Make the Picture controls VISIBLE property = False
'This method works in VB 6.
'(I dont know if all the data will print when the grid contains
'more rows than can fit on 1 screen)
Dim sScale As Double
Dim sHeading As String
sHeading = "Frigidaire: Virtual Loads"
Printer.Orientation = vbPRORLandscape
Picture1.Picture = MSFlexGrid1.Picture
sScale = Printer.ScaleHeight * (MSFlexGrid1.Rows / 50)
Printer.CurrentX = 100
Printer.Font = "Arial"
Printer.FontSize = "14"
Printer.FontBold = False
Printer.Print sHeading
' print the date/time
' move down a line
Printer.CurrentX = 0
Printer.CurrentY = Printer.TextHeight(sHeading) * 1
Printer.Print "Date: " & Now
Printer.PaintPicture Picture1.Picture, 0, 500, Printer.ScaleWidth, sScale
Printer.EndDoc
End Sub