A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Create a report from form



 
 
Thread Tools Display Modes
  #1  
Old July 28th, 2007, 02:22 PM posted to microsoft.public.access.reports
glenngrossman
external usenet poster
 
Posts: 5
Default Create a report from form

I have created a form. I now want to create a command button that opens a
report but only with the record (with detail records in subform) to populate
the report. Everytime I create the report, it brings in all records not the
one that is on the screen. That is the only record that I want to appear on
the report. I would then click on the commad button and the report would open
up with that record only.

Many thanks in advance.
  #2  
Old July 28th, 2007, 03:50 PM posted to microsoft.public.access.reports
Jeff Boyce
external usenet poster
 
Posts: 1,555
Default Create a report from form

While it is possible to tell Access to take a form and print it, it may not
be a good idea. After all, forms are intended to be used as on-screen
displays, while reports are intended to fit/work on a printed page. And, as
you've found, telling Access to "print my form" gets ALL the records
associated with that form.

Two alternate approaches:

1. Create a report, with the layout you need for print. Add a command
button from the form to open THAT report, and send along the ID of the
record being viewed on the form. See Access HELP for the exact syntax of:
DoCmd.OpenReport ,,,,

2. Modify the way your form loads its records so it only loads one. Send
that to print.

I recommend the former.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/


"glenngrossman" wrote in message
...
I have created a form. I now want to create a command button that opens a
report but only with the record (with detail records in subform) to

populate
the report. Everytime I create the report, it brings in all records not

the
one that is on the screen. That is the only record that I want to appear

on
the report. I would then click on the commad button and the report would

open
up with that record only.

Many thanks in advance.


  #3  
Old July 28th, 2007, 04:00 PM posted to microsoft.public.access.reports
Steve[_10_]
external usenet poster
 
Posts: 608
Default Create a report from form

It appears the OP may know this but I just wanted to point it out ---
Since he has a form/subform, the OP needs a report/subreport.

I also agree with the recommendation to use approach #1.

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications





"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote in message
...
While it is possible to tell Access to take a form and print it, it may
not
be a good idea. After all, forms are intended to be used as on-screen
displays, while reports are intended to fit/work on a printed page. And,
as
you've found, telling Access to "print my form" gets ALL the records
associated with that form.

Two alternate approaches:

1. Create a report, with the layout you need for print. Add a command
button from the form to open THAT report, and send along the ID of the
record being viewed on the form. See Access HELP for the exact syntax of:
DoCmd.OpenReport ,,,,

2. Modify the way your form loads its records so it only loads one. Send
that to print.

I recommend the former.

--
Regards

Jeff Boyce
www.InformationFutures.net

Microsoft Office/Access MVP
http://mvp.support.microsoft.com/

Microsoft IT Academy Program Mentor
http://microsoftitacademy.com/


"glenngrossman" wrote in message
...
I have created a form. I now want to create a command button that opens a
report but only with the record (with detail records in subform) to

populate
the report. Everytime I create the report, it brings in all records not

the
one that is on the screen. That is the only record that I want to appear

on
the report. I would then click on the commad button and the report would

open
up with that record only.

Many thanks in advance.




  #4  
Old July 28th, 2007, 09:55 PM posted to microsoft.public.access.reports
Larry Linson
external usenet poster
 
Posts: 3,112
Default Create a report from form

"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote

2. Modify the way your form loads its records so it only loads one.

Send
that to print.


Just to clarify... I believe Jeff means that you must change the Form's
Recordsource so it retrieves only the one Record you want to Print; if you
just see one Record because the Form is in single-form view, but the
Recordsource includes additional Records, all will be printed if you Print
the Form.

Larry Linson
Microsoft Access MVP


  #5  
Old July 28th, 2007, 10:36 PM posted to microsoft.public.access.reports
Steve[_10_]
external usenet poster
 
Posts: 608
Default Create a report from form

1. Create a report, with the layout you need for print. Add a command
button from the form to open THAT report, and send along the ID of the
record being viewed on the form. See Access HELP for the exact syntax of:
DoCmd.OpenReport ,,,,

Yes, that's correct but Jeff recpmmended approach #1

PC Datasheet
Providing Customers A Resource For Help With Access, Excel And Word
Applications








"Larry Linson" wrote in message
...
"Jeff Boyce" -DISCARD_HYPHEN_TO_END wrote

2. Modify the way your form loads its records so it only loads one.

Send
that to print.


Just to clarify... I believe Jeff means that you must change the Form's
Recordsource so it retrieves only the one Record you want to Print; if you
just see one Record because the Form is in single-form view, but the
Recordsource includes additional Records, all will be printed if you Print
the Form.

Larry Linson
Microsoft Access MVP



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:29 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.