Hi
If I have a form open, what is the code that is equivalent to using the
File->Print menu with select record(s) option to print the form with the
currently displayed record values?
Thanks
Regards 5 2623
In general, it's best to create a report for printing. You can then
precisely control how the print should be laid out. If it helps, you can
save the form as a report (File | Save As, in design view) to give you a
running start.
You can then use the primary key value in the form to identify the record to
be printed. Example code in:
Print the record in the form
at: http://allenbrowne.com/casu-15.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values?
Hi Allen
Thanks for that but the client want a simple dump of the form with the
currently displayed record. I figured If I could automate the File-Print
command with Selected Record(s) option that'll do the trick.
Thanks
Regards
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ... In general, it's best to create a report for printing. You can then precisely control how the print should be laid out. If it helps, you can save the form as a report (File | Save As, in design view) to give you a running start.
You can then use the primary key value in the form to identify the record to be printed. Example code in: Print the record in the form at: http://allenbrowne.com/casu-15.html
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"John" <Jo**@nospam.in fovis.co.uk> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values?
Try:
RunCommand acCmdSelectReco rd
DoCmd.PrintOut acSelection
I hate to even tell you how to do something that badly, though. :-)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:jP******** *************** *******@pipex.n et... Thanks for that but the client want a simple dump of the form with the currently displayed record. I figured If I could automate the File-Print command with Selected Record(s) option that'll do the trick.
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ... In general, it's best to create a report for printing. You can then precisely control how the print should be laid out. If it helps, you can save the form as a report (File | Save As, in design view) to give you a running start.
You can then use the primary key value in the form to identify the record to be printed. Example code in: Print the record in the form at: http://allenbrowne.com/casu-15.html
"John" <Jo**@nospam.in fovis.co.uk> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values?
Thanks for this. Any way to select the printer and/or page orientation
before printing?
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message
news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ... Try: RunCommand acCmdSelectReco rd DoCmd.PrintOut acSelection
I hate to even tell you how to do something that badly, though. :-)
-- Allen Browne - Microsoft MVP. Perth, Western Australia. Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org.
"John" <Jo**@nospam.in fovis.co.uk> wrote in message news:jP******** *************** *******@pipex.n et... Thanks for that but the client want a simple dump of the form with the currently displayed record. I figured If I could automate the File-Print command with Selected Record(s) option that'll do the trick.
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ... In general, it's best to create a report for printing. You can then precisely control how the print should be laid out. If it helps, you can save the form as a report (File | Save As, in design view) to give you a running start.
You can then use the primary key value in the form to identify the record to be printed. Example code in: Print the record in the form at: http://allenbrowne.com/casu-15.html
"John" <Jo**@nospam.in fovis.co.uk> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. ..
If I have a form open, what is the code that is equivalent to using the File->Print menu with select record(s) option to print the form with the currently displayed record values?
Try:
RunCommand acPrint
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"John" <Jo**@nospam.in fovis.co.uk> wrote in message
news:Cs******** ************@pi pex.net... Thanks for this. Any way to select the printer and/or page orientation before printing?
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ... Try: RunCommand acCmdSelectReco rd DoCmd.PrintOut acSelection
I hate to even tell you how to do something that badly, though. :-)
"John" <Jo**@nospam.in fovis.co.uk> wrote in message news:jP******** *************** *******@pipex.n et... Thanks for that but the client want a simple dump of the form with the currently displayed record. I figured If I could automate the File-Print command with Selected Record(s) option that'll do the trick.
"Allen Browne" <Al*********@Se eSig.Invalid> wrote in message news:43******** **************@ per-qv1-newsreader-01.iinet.net.au ... In general, it's best to create a report for printing. You can then precisely control how the print should be laid out. If it helps, you can save the form as a report (File | Save As, in design view) to give you a running start.
You can then use the primary key value in the form to identify the record to be printed. Example code in: Print the record in the form at: http://allenbrowne.com/casu-15.html
"John" <Jo**@nospam.in fovis.co.uk> wrote in message news:%2******** ********@TK2MSF TNGP15.phx.gbl. .. > > If I have a form open, what is the code that is equivalent to using > the File->Print menu with select record(s) option to print the form > with the currently displayed record values?
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jody Gelowitz |
last post by:
I am having a problem with printing selected pages. Actually, the problem
isn't with printing selected pages as it is more to do with having blank
pages print for those pages that have not been selected.
For example, if I were to have 5 pages with every second page printing, I
would get the following results:
Page 1 = Print OK
Page 2 = Blank
Page 3 = Print OK
Page 4 = Blank
|
by: John |
last post by:
Hi
Is there a way to print/e-mail the current record as it appears on a form?
Thanks
Regards
|
by: Sami |
last post by:
I hope someone will tell me how to do this without having to do any VB
as I know nothing in that area. I am a rank beginner in using Access.
I have created a database consisting of student athletes. I have now
learned how to join two different tables in a query so that I might
generate a report.
Specifically, student athletes at a community college are required to
graduate with an AA or AS degree. Consequently, various steps are in...
|
by: bobh |
last post by:
Hi All,
A clients database (built by another and not very well but, its what I
have to work with) has bound forms that display customer information
and when printed is three pages long. The information on page 3 is set
to screen display only. When printing it prints 3 pages with the last
page being a blank page. I have tried to surpress the third page by
putting a print button on the form and adding the vba code -
Docmd.Printout acPages,...
|
by: paquer |
last post by:
Hello'
How do I get the subform to print along with the main form?
I want my user's to be able to go in the field with a printout of the
info they need to populate in the database. So when they get back in
the office they can input the data field by field.
The reason I want them to take the actual form & subform is there is
prepopulated data they need in the field.(which is on the form).
& I want the paper version to look exactly like...
| |
by: paquer |
last post by:
I have forms that are used in the office as well as in the field.
I want user's to be able to print out an exact copy of the form for
"in the field" data entry. (Yes we are still stuck in the 90's. We use
pencils in the field.) not PDA's.
Thier is "header" information on the Main Form. They use the Subform
for Data Entry. The Record on the Subform is created at the time of
the job via a Command Button on the main form.
Ive run into many...
|
by: Robert |
last post by:
I have a form with a print button on it which opens a report. I specify the
id in the where clause in the OpenReport statemt say the report prints for
the current record. This works fine for existing records in the table. But
when I add a new record I have to arrow backward and then forward to get it
to print. I tried Me.Requery but it sent me to the first record in the
table.
How can I print the current record on the form?
|
by: Dave |
last post by:
Hello!
What's the best way to make a button print *just* the selected
(displayed) record of a subform, when that subform is currently part
of a larger form?
Thanks!
|
by: it0ny |
last post by:
Hi guys,
thanks I am fairly new to this forum so I hope I chose the right place to post this question.
I try to make my program printout a deposit's report. I created a class to store the printing printing data and the actual database data in a recordset.
the class looks like this:
Public Class BRPDD 'Balance Report PrintingDocument Data
Public totalReceiptsNum As Integer
Public totalLicFee As Double
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
| |
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |