Forms - Printing - Reports

  • Thread starter cwAFcontractor via AccessMonster.com
  • Start date
C

cwAFcontractor via AccessMonster.com

Ok, I know that you technically aren't supposed to print forms but after i
put the information into the form and save it to the table i want it printed
exactly like how it is on the form. I dont know how to get the form to look
the exact same way in report form, so when i print my form out it doesn't
print the subform that is on it. Is it just not possible to print a subform
on a form or could you possible explain to me how to convert the form into a
report and look exactly like my form setup? or maybe even point me to a book
that will explain how to do this? I have access to books24x7 so i can view
any book at any time. Thanks in advance for the assistance.
 
A

Arvin Meyer [MVP]

To make a report that looks exactly like the form, select the form in the
database window, right-click o it and choose Save As Report and give it a
new name.
 
C

cwAFcontractor via AccessMonster.com

When i do a save as report, does it only save that one record in the form as
a report? Will i have to saveas report each time i need to print out the next
record on that form? What i use the database for is tracking my parts and the
one form is an order form and i print out the record i just added to the form
to fax to the place i request my parts from. If i have a command button put
 
J

John W. Vinson

Ok, I know that you technically aren't supposed to print forms but after i
put the information into the form and save it to the table i want it printed
exactly like how it is on the form. I dont know how to get the form to look
the exact same way in report form, so when i print my form out it doesn't
print the subform that is on it. Is it just not possible to print a subform
on a form or could you possible explain to me how to convert the form into a
report and look exactly like my form setup? or maybe even point me to a book
that will explain how to do this? I have access to books24x7 so i can view
any book at any time. Thanks in advance for the assistance.

If your Form is actually the exact image you want to send - with one or more
subforms, each with one or more records, etc. - you might want to use a screen
capture program such as SnagIt. It may be possible to do this in pure Access
code (and I'll watch the thread with interest to see) but I'm not aware of any
way to do so.
 
A

AccessVandal via AccessMonster.com

I'm on Access 2000.

Make a backup of your form first before you SaveAs a Report. A2K version is
known to cause a minor problem. On my test, the form size was enlarge and
also the size of the control was enlarge as well as the size of the Fonts.
 
A

Arvin Meyer [MVP]

No it saves the same recordsource as the form. Then put a button on the form
to open to the same record as on the form:

Private Sub cmdOpenReport_Click()
DoCmd.OpenForm "ReportName", acPreview, , "ID=" & Me.txtID
End Sub
 
C

cwAFcontractor via AccessMonster.com

Hello, I tried this code on my form and its doesn't seem to be working...i
get a compile error when i click on the command button. I'm using office 2007
so not sure if thats a difference or not. i will continue to mess with it and
see what i can do to change some things around but maybe you can see
something that i have wrong. It highlights the .txtID with the compile error
and the message says that the method or data member is not found.

Private Sub cmdOpenReport_Click()

On Error GoTo Err_cmdOpenReport_Click
DoCmd.OpenForm "Shipments", acPreview, , "ID=" & Me.txtID

Exit_cmdOpenReport_Click:
Exit Sub

Err_cmdOpenReport_Click:
MsgBox Err.Description
Resume Exit_cmdOpenReport_Click

End Sub
 
A

Arvin Meyer [MVP]

ID and txtID are the field and textbox that house the field of your primary
key. You need to change their names to the names of your field and textbox.
 
C

cwAFcontractor via AccessMonster.com

OH i'm bout to give up. now i'm getting an error: "Object doesn't support
this property or method." I will have to work on this later. And later i mean
by like 6 days. I have got to get this inventory done and wont be able to
work on this for a while. Thanks for the help. If i can't figure it out on my
own when i start back up i'm sure you will see my new request out there. haha
thanks much for the help so far.
ID and txtID are the field and textbox that house the field of your primary
key. You need to change their names to the names of your field and textbox.
Hello, I tried this code on my form and its doesn't seem to be working...i
get a compile error when i click on the command button. I'm using office
[quoted text clipped - 23 lines]
 
A

Arvin Meyer [MVP]

I just noticed an error in my code. Instead of:

DoCmd.OpenForm "Shipments", acPreview, , "ID=" & Me.txtID

it should be:

DoCmd.OpenReport "Shipments", acPreview, , "ID=" & Me.txtID

Forms don't have a Preview mode which is why you were getting the error.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

cwAFcontractor via AccessMonster.com said:
OH i'm bout to give up. now i'm getting an error: "Object doesn't support
this property or method." I will have to work on this later. And later i
mean
by like 6 days. I have got to get this inventory done and wont be able to
work on this for a while. Thanks for the help. If i can't figure it out on
my
own when i start back up i'm sure you will see my new request out there.
haha
thanks much for the help so far.
ID and txtID are the field and textbox that house the field of your
primary
key. You need to change their names to the names of your field and
textbox.
Hello, I tried this code on my form and its doesn't seem to be
working...i
get a compile error when i click on the command button. I'm using office
[quoted text clipped - 23 lines]
form
to open to the same record as on the form:
 
C

cwAFcontractor via AccessMonster.com

Ah thanks. I will try that. You've been a great help, i appreciate it.
I just noticed an error in my code. Instead of:

DoCmd.OpenForm "Shipments", acPreview, , "ID=" & Me.txtID

it should be:

DoCmd.OpenReport "Shipments", acPreview, , "ID=" & Me.txtID

Forms don't have a Preview mode which is why you were getting the error.
OH i'm bout to give up. now i'm getting an error: "Object doesn't support
this property or method." I will have to work on this later. And later i
[quoted text clipped - 16 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top