473,320 Members | 1,817 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Printing Corresponding Report for the Current Record

Hi Everyone,

I have been working on various things within this same database for
the past 5-months, and has given me nothing but trouble in the
development, because the people I am designing this for is just coming
up with more and more features they would like to see in it.

What I am trying to do is when a command button is pressed in a form
view, I want to generate a report based on the current selected active
record, and not generate a report for all records. For example, when
the button is pressed for record 123, I would want to print the report
for record 123 only, and send this directly to the default printer.

I am trying to get this in a macro, I guess that is the best way.

The form name is "FormPrimary".
The report name is "ReportCWO".
The primary key is "ConstituentIDN".

Any help would be appreciated greatly.

Signed,
Charles Robinson III
ro******@midnightdragonfx.cjb.net
Nov 12 '05 #1
2 4827
Put the following in the Click event of your button:

DoCmd OpenReport "ReportCWO",,,"[ConstituentIDN] = " & Me!ConstituentIDN
--
PC Datasheet
Your Resource For Help With Access, Excel And Word Applications
re******@pcdatasheet.com
www.pcdatasheet.com

"Charles Robinson III" <ro******@midnightdragonfx.cjb.net> wrote in message
news:0u********************************@4ax.com...
Hi Everyone,

I have been working on various things within this same database for
the past 5-months, and has given me nothing but trouble in the
development, because the people I am designing this for is just coming
up with more and more features they would like to see in it.

What I am trying to do is when a command button is pressed in a form
view, I want to generate a report based on the current selected active
record, and not generate a report for all records. For example, when
the button is pressed for record 123, I would want to print the report
for record 123 only, and send this directly to the default printer.

I am trying to get this in a macro, I guess that is the best way.

The form name is "FormPrimary".
The report name is "ReportCWO".
The primary key is "ConstituentIDN".

Any help would be appreciated greatly.

Signed,
Charles Robinson III
ro******@midnightdragonfx.cjb.net

Nov 12 '05 #2
Thanks.
On Mon, 01 Dec 2003 23:15:52 GMT, "PC Datasheet" <sp**@nospam.spam>
wrote:
Put the following in the Click event of your button:

DoCmd OpenReport "ReportCWO",,,"[ConstituentIDN] = " & Me!ConstituentIDN


Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
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
6
by: John | last post by:
Hi, I have simple database based on 3 tables. Relationship is 'one to many' between table 1 and 2, also between 2 and 3 table'one to many'. I have made form where I enter data in all 3 tables....
4
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...
5
by: John | last post by:
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 ...
2
by: Gargamil | last post by:
Hello, All! This is probably a curly one. I want to print a series of reports, and for each report I want to attach and print an accompanying PDF file. So record 1 has a report page and then...
1
by: roveagh1 | last post by:
Hi I've been using the 2 year old link below to repeat values from previous record field into current corresponding field. It's worked fine for text but the last piece of advice was to use the same...
2
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...
18
by: Brett | last post by:
I have an ASP.NET page that displays work orders in a GridView. In that GridView is a checkbox column. When the user clicks a "Print" button, I create a report, using the .NET Framework printing...
0
it0ny
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.