Click to See Complete Forum and Search --> : Help with printing
jenny723
May 15th, 2000, 09:58 AM
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.
Dr_Evil
May 15th, 2000, 08:46 PM
What type of grid are you using?
jenny723
May 16th, 2000, 10:02 AM
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.
Dr_Evil
May 16th, 2000, 07:37 PM
This is the only way I know of to print a MSFlexGrid. It works but the resolution isn't the best.
Private Sub Command1_Click()
Printer.PaintPicture MSFlexGrid1.Picture, 0, 0
Printer.EndDoc
End Sub
Hope this helps ;)
jenny723
May 17th, 2000, 09:38 AM
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...
Dr_Evil
May 17th, 2000, 07:37 PM
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. :(
jenny723
May 18th, 2000, 08:27 AM
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.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.