By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,720 Members | 2,237 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,720 IT Pros & Developers. It's quick & easy.

Printing directly to a form

P: 2
I've been a long time programmer who was away from things for a good while. Recently I picked it back up and have been writing code in Access 2010.

My problem is that I have pre-printed forms and I need to lay data out for printing in specific locations to print over the form and prefill some areas.

I can't figure out where and how to do this.
I've tried to just use a blank form print to but me.currentX and so on don't work there.
I tried a blank report with no luck. I even copied some code from the web that was supposed to draw and center some text on the report during the format even but it never happened and never fired for that matter.

I just want to tell the cursor to goto X,Y and print something.
Feb 29 '12 #1
Share this Question
Share on Google+
4 Replies


NeoPa
Expert Mod 15k+
P: 31,489
Specific positions on a sheet should probably be done using the Page Header and Footer sections. These allow X distance from the top and bottom of the page respectively. Otherwise you build up the page using the other sections as blocks.

There is no facility to print to a specific part of the page otherwise, I'm afraid.
Feb 29 '12 #2

P: 2
Ok, so I guess you are speaking of using a report instead of a form.
So then my question is where does my code go?
I'm trying to put code in the header section under the format event but when I open the report it doesn't fire.
Feb 29 '12 #3

NeoPa
Expert Mod 15k+
P: 31,489
Pendruce:
Ok, so I guess you are speaking of using a report instead of a form.
I assumed the form you were referring to was made of paper and put into your printer to overprint. Yes. The question was about printing, so my answer refers to designing a report.

Pendruce:
I'm trying to put code in the header section under the format event but when I open the report it doesn't fire.
The header section. Which of the header sections would that be? What code are you referring to? How are you opening the report (Design view / Preview / Normal (To print))?

I can't help you unless you explain what you're talking about a lot more clearly than you have.
Feb 29 '12 #4

100+
P: 759
@Pendruce:
"I'm trying to put code in the header section under the format event but when I open the report it doesn't fire."

The On Format event doesn't fire if you open the report in Report View mode. But, if you open the report in Print Preview mode this event will be fired.

** snip **
Mar 1 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.