Print a Form

R

Roger

I know what I want to do is not the proper thing to do.
What I would like to do is print a form when after all info is entered.
None of this info goes into the table and none of the text boxes are bound.
At the end of each week, we need to calculate how much money we have
after adding what was sold, (already entered) what is in progress and
how much profit we will make on items in progress., also count the cash
on hand. Basically it is just a form which calculates how much we should
have. I can print it by going to file then print, but I want to put a
command button on it so all they have to do is click it and it will print
I have tried everythin I can think of and help did not have anything
in it to do this
I put in a event procedure on the click, but can get nothing to work
sounds like it should be simple, just not for me.
Any help is appreciated, before I go bald
Roger
 
D

Daniel

docmd.RunCommand acCmdPrint

will make the print dialog appear (Same as doing File-Print)

or, alternatively you could use the

DoCmd.PrintOut Method

It avoids the need to even see then dialog. You can also specify which
pages to print and the number of copies to print... Look it up in the help
for more details.

Hope this help,

Daniel P
 
J

John W. Vinson

What I would like to do is print a form when after all info is entered.
None of this info goes into the table and none of the text boxes are bound.

ummm... if you're just using Access as a text formatter and simple calculator,
you're using a sledgehammer to crack pecans. Could you not simply use a Word
template with a table, or a simple Excel spreadsheet?

John W. Vinson [MVP]
 
R

Roger

Thank You
Daniel
That is exactly what I needed.

Daniel said:
docmd.RunCommand acCmdPrint

will make the print dialog appear (Same as doing File-Print)

or, alternatively you could use the

DoCmd.PrintOut Method

It avoids the need to even see then dialog. You can also specify which
pages to print and the number of copies to print... Look it up in the help
for more details.

Hope this help,

Daniel P
 
R

Roger

John
That is what I am doing now, all calculations in excell, just thought
it would be easier for the user if everything was all in 1 application.
You are right, access is overkill, but I guess my thinking was that
nothing was going into a table, and would disappear when forn is closed
it would not clutter up the program.
Your thoughts
Thanks
Roger
 
Top