How to print a record in a form by pushing a button in another form ?

P

pschrader

Hi !

I'm using MS Access 2003 and Windows XP Professional.

I've a form A with a print button on it.
Pushing its print button prints the form as it is displaying the current
record.

Now I 'd like to do the same thing by pushing a print button on another form
B.
E.g., pushing the button that is on B opens the form A, prints it as it is
displaying the current record, and closes it again.

How can this be done ?

Your kind help will be greatly appreciated.

Peter
 
A

Albert D. Kallal

E.g., pushing the button that is on B opens the form A, prints it as it is
displaying the current record, and closes it again.

But what record do you expect form a to open to? How will it know which
record is to be the current reocrd?
How can this be done ?

See my other post to your printing problems. The solution here *AGAIN* is to
use a report.

The Significant detail you've left out in the above is which record do you
want form A to open to? How do you plan to determine what record for form A
should be? Perhaps you want form A to open to the same record you're
currently viewing and editing on form b?

The solution here is to simply launch a report that prints the current
record on form b to that report you "going" to build that form a uses. At
the end of the day you're going to have a situation where both forms (a + b)
can share the same report for printing this data. This will also give you
complete control of how the printout of data looks, and the printout of the
data will be exactly the same regardless of which form uses this report to
print out the data.
 
P

pschrader

Thank you very much for your kind help.
See my other post to your printing problems. The solution here *AGAIN* is
to use a report.

I knew that this is the standard way in Access programming.

However, in this case I should like to save the extra effort of programming
reports.
A lot of effort has gone into designing the layout and arrangement of data
in the form,
and the form displays the data very nicely.
So I should like to use it also for printing if I can, even if this method
has some drawbacks.
Also the visibility of controls can be set in the property window in a way
they are invisible in the printout, but can be seen on the desktop.
So I feel that Microsoft has provided a sofisticated infrastructure for
printing out forms.

I am not a VBA programmer, but I have the very strong suspicion that a few
lines of VBA code can solve my problem.
... you want form A to open to the same record you're currently viewing
and editing on form b?

Yes.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top