-
I have made a menu item in a Visual Basic 6.0 program I am working on to print some data in a certain grid. How do I tell it to print the data that is on the screen at a certain time (when the user tells it to print). Grid is fixed number of columns but number of rows may vary. mnuFilePrint_Click() type thing. HELP please.
-
What type of grid are you using?
-
a ms flex grid. I have it connected with an Access database but I can't figure out the code to make it print the listings on the grid when on screen.
-
This is the only way I know of to print a MSFlexGrid. It works but the resolution isn't the best.
Code:
Private Sub Command1_Click()
Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
Printer.EndDoc
End Sub
Hope this helps ;)
-
Well... thanks but I am trying to write code to make a loop work that will count the columns and then print the rows with line breaks...
-
I had the same problem when using MSFlexGrid. I just wrote a query that would return the same results and used it in the Data Report Designer or Crystal Reports. Sorry I couldn't help. :(
-
Hey, don't feel bad. Thanks for trying to help me. I could have done the whole thing in Access but I just can't get it to work in VB. Very frustrating.