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 » New Users
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Create a button that prints the selected record of a report



 
 
Thread Tools Display Modes
  #1  
Old March 25th, 2010, 09:21 PM posted to microsoft.public.access.gettingstarted
forest8
external usenet poster
 
Posts: 196
Default Create a button that prints the selected record of a report

Hi

I need to print a record for an individual student.

I have created a report that contains the same information as my form.

I want to create a button on my form that when clicked on the report for
that individual is the one being printed.

I also want the button to be able to print all the records for the same
individual.

I must admit the queries confuse me so any guidance will be helpful.
  #2  
Old March 26th, 2010, 05:54 AM posted to microsoft.public.access.gettingstarted
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Create a button that prints the selected record of a report

Take a look at the solution found at
http://www.mvps.org/access/reports/rpt0002.htm. You can get a kick start by
creating a button using the command button wizard.

--
Duane Hookom
MS Access MVP


"forest8" wrote in message
...
Hi

I need to print a record for an individual student.

I have created a report that contains the same information as my form.

I want to create a button on my form that when clicked on the report for
that individual is the one being printed.

I also want the button to be able to print all the records for the same
individual.

I must admit the queries confuse me so any guidance will be helpful.


  #3  
Old March 28th, 2010, 06:20 AM posted to microsoft.public.access.gettingstarted
forest8
external usenet poster
 
Posts: 196
Default Create a button that prints the selected record of a report

An addendum to my question.

Can you please explain how this works if originally I had a main form and a
subform and I created a report that had both forms on it?

My main form has information on a student, i.e. name, age, program of study.
The subform is a tabcontrol that deals with detailed information on the
student.

If there are 100 students, how do I only print out the information for
student 79?

I hope this isn't too silly to ask but I don't really understand how this
works. I understand forms but not reports.

Thank you

"Duane Hookom" wrote:

Take a look at the solution found at
http://www.mvps.org/access/reports/rpt0002.htm. You can get a kick start by
creating a button using the command button wizard.

--
Duane Hookom
MS Access MVP


"forest8" wrote in message
...
Hi

I need to print a record for an individual student.

I have created a report that contains the same information as my form.

I want to create a button on my form that when clicked on the report for
that individual is the one being printed.

I also want the button to be able to print all the records for the same
individual.

I must admit the queries confuse me so any guidance will be helpful.


  #4  
Old March 28th, 2010, 05:05 PM posted to microsoft.public.access.gettingstarted
Duane Hookom[_4_]
external usenet poster
 
Posts: 316
Default Create a button that prints the selected record of a report

The answer is the same as I suggested. You need to substitute your field,
control, and report names for the ones in the sample on the web page.

I generally start by using the command button wizard to write the code to
open the report. Then I modify the code as per the suggested code on the web
page.

If you can't figure this out, come back with the code the wizard has created
as well as the field name storing the "79".

--
Duane Hookom
MS Access MVP


"forest8" wrote in message
...
An addendum to my question.

Can you please explain how this works if originally I had a main form and
a
subform and I created a report that had both forms on it?

My main form has information on a student, i.e. name, age, program of
study.
The subform is a tabcontrol that deals with detailed information on the
student.

If there are 100 students, how do I only print out the information for
student 79?

I hope this isn't too silly to ask but I don't really understand how this
works. I understand forms but not reports.

Thank you

"Duane Hookom" wrote:

Take a look at the solution found at
http://www.mvps.org/access/reports/rpt0002.htm. You can get a kick start
by
creating a button using the command button wizard.

--
Duane Hookom
MS Access MVP


"forest8" wrote in message
...
Hi

I need to print a record for an individual student.

I have created a report that contains the same information as my form.

I want to create a button on my form that when clicked on the report
for
that individual is the one being printed.

I also want the button to be able to print all the records for the same
individual.

I must admit the queries confuse me so any guidance will be helpful.


  #5  
Old March 28th, 2010, 10:45 PM posted to microsoft.public.access.gettingstarted
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Create a button that prints the selected record of a report

On Sat, 27 Mar 2010 22:20:02 -0700, forest8
wrote:

My main form has information on a student, i.e. name, age, program of study.
The subform is a tabcontrol that deals with detailed information on the
student.

If there are 100 students, how do I only print out the information for
student 79?

I hope this isn't too silly to ask but I don't really understand how this
works. I understand forms but not reports.


I think you need to clarify your understanding of forms too.

You say that your main form has information. IT DOESN'T.

Your *tables* have information. That's the only place in your database that
the information is stored!

A Form is a tool to display information from a table on the screen in a way
that lets you view, edit, and add more information... to the tables.

A Report is a tool to display information from a table in a way that lets you
print it (or print preview it).

Either a form or report can be based directly on a Table, or (much more
usefully!) on a Query which selects desired fields and records from the table.

If you want to see information about student 79 printed, you can base your
Report on a Query selecting information only about that student. A common way
to do this is to use a Parameter Query, with a criterion referencing a form.
E.g. if you have frmStudents, with a control named StudentID, you could base
your report on a query with a criterion

=Forms!frmStudents!StudentID

on the ID field. This will pull data for the student whose ID is currently on
the form, from the table or tables, and lay it out on the report.
--

John W. Vinson [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 05:39 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.