Printing a form?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi..
I'm creating a form for a user to build a profile on individual people. The
data will be collected in spreadsheet format in a table. I've got this piece
figured out more or less.

What I would like to do now is provide the user with an option for printing
out what they entered in the form (it's a rather long, tabbed form), checked
buttons and check boxes and all.

I've been told that forms are not really for printing out, and that I should
create a report and then put a macro-ed button on the form.

PROBLEM: When I try to create a report, I'm told that I have too many
fields, and that Access cannot create the report.

Is there anyway around this? I'd like the user to have a hard copy of what
they entered if they choose to do that.
 
A report can have as many controls as a form (750 over its life) ... you can
create a new empty one and select, copy, and paste the objects from a form
or another report. Make the recordsource of the report the same as that of
the form, and open the report from a button using code something like:

DoCmd.OpenReport "ReportName" ,,, "IDfield =" & Me.txtID
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Arvin: Thanks. I'm not sure I'm skilled enough to do this, but I'll give it
a shot. So,
- I'll be opening a report in design form
- Copying and pasting all the various text boxes, combo boxes...etc. (can
you have a report and a form open at the same time?)
- Then change the recordsource (don't know what this is..where is it, in
properties?)
- then create a button on the form with a macro to open the report.

Question 1: My form is tabbed (had to do it this way, because I exceeded the
allowed length). So, when I copy the pieces from each of the tabs, will they
all fit into a report?

Question 2: Will the text from text boxes print out in its entirety, even
though it may not all be visible on the form?

Question 2: -excuse my ignorance..just staring access...but how will access
know which record to print? Is that a piece of the macro code?

Thanks very much
 
Answers in line:

Stilla said:
Arvin: Thanks. I'm not sure I'm skilled enough to do this, but I'll give
it
a shot. So,
- I'll be opening a report in design form
- Copying and pasting all the various text boxes, combo boxes...etc. (can
you have a report and a form open at the same time?)
Yes

- Then change the recordsource (don't know what this is..where is it, in
properties?)
Yes

- then create a button on the form with a macro to open the report.

Question 1: My form is tabbed (had to do it this way, because I exceeded
the
allowed length). So, when I copy the pieces from each of the tabs, will
they
all fit into a report?

Maximum form or report size is 22". With a form, you can get around that
with a Tab control. With a report, you can use subreports set to an inch or
so in height with the CanGrow property of the subreport and the detail
section set to Yes. I've put as many as 20 pages in a report using 7
subreports. I've even used sub/subreports.
Question 2: Will the text from text boxes print out in its entirety, even
though it may not all be visible on the form?

Yes if you set the CanGrow property to "Yes" Just remember that that moves
everything below it down.
Question 2: -excuse my ignorance..just staring access...but how will
access
know which record to print? Is that a piece of the macro code?

That's exactly what this line is in the code for your command button:

DoCmd.OpenReport "ReportName" ,,, "IDfield =" & Me.txtID

You will need to change the relevant names, of course.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top