Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing a Form

Status
Not open for further replies.

mgifford

Programmer
Jun 3, 2004
30
US
I have a form set up and want to give the user the option to print it without cutting off the right side of the table. Is there any other way to do this besides making the table less than 100%?
 
Have you tried to play with the margins ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
I tried that and it still cuts off. I assume it is because the form fields at larger than what I have set the table and cell widths at.

Does anyone have any other ideas about my options for creating a printer friendly version of a form? The user has to be able to print the data once the form is complete.
 
how about a custom print button?
that custom print button reads all the info off the form and populates a a text file? or html? and then sends this temp file to the printer?

bit arse about face, perhaps having more control over the size of the form and controls would be a better idea?
 
That's a great idea! That's exactly what I had in mind but not sure how to do it.

Now, where do I start? Do you know where I can find information about coding a custom print button and populating a text/html file?

Thanks so much!
 
what lang is this written in#??
you should be ok with just a normal button on the form.
the buttons onclick event you will need to write the details to a temp file

something like

Set tsTemp = FSO.CreateTextFile("c:\temp.txt", True)
tsTemp.WriteLine Now()
tsTemp.WriteLine "Username=" & txtBox1.Value '???
tsTemp.Close
Set tsSMSStampfile = Nothing
'then print the c:\temp.txt??
'never told a printer to print a file before, there must
'b a clever way of doing it, all i can think of is
'WshShell.Run "cmd /c c:\temp.txt > lpt1
im sure someone else can help you out with that one
 
hang on, it sounds like you are in office? excel or word perhaps? if so you can just populate cells in a worksheet and then print the worksheet using excels built in functions?
 
No, I have the form set up on our intranet writing the data to an Access database. The user has the ability to add an event using the form, view a list with basic details of a scheduled event and then click to view complete details of each individual event which opens up the form again. I need them to be able to print the details of the event.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top