Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Forms will not print in color

Status
Not open for further replies.

Patentinv

Technical User
Aug 26, 2005
84
US
Hi,

I have 5 forms that I print, 3 print in color and 2 do not.

I can not figure why the 2 won't print in color.

I'm using a macro (printscreen) in the on click procedure of a command button, which is the same macro for all five forms.

Any suggestions on why this is, would be greatly appreciated.

Thanks,
patentinv
 
Did you check if all 5 screen captures are in color?

Pampers [afro]
Keeping it simple can be complicated
 
Hello Pampers,

Thanks for the suggestion, I'm not sure how to check to see if my screen capture is in color.

I made a report and it printed in color, but I don't know how to have my report print from my form.

My forms name is invoicefrm its record source is a table called invoicetab, my reports name is called invoicerpt and its also bound to the invoicetab.

The primary key in the invoicetab is called (ID), I need to make a module to call from a command button on the invoice form that will only print the record that is showing in the invoice form.

I believe it would be a where clause, some thing like invoicetab.ID = invoicetab.ID I'm having a problem with it wanting to print every record in the form. Instead of just the record that the form is showing.

Any help will be greatly appreciated.

Thanks
patentinv



 
Have a look at the 4th argument of the DoCmd.OpenReport method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
for example on a print button you could but the code:

Code:
Dim strWhere1 As String
Dim strReportName As String

strReportName = "rprtInvoice"
    
strWhere1 = "(VoyageID=" & Me.VoyageID & ")"
DoCmd.OpenReport strReportName, acViewPreview, , strWhere1
The (print preview of the) report will now open for the current voyageID (the 4th argument)

Pampers [afro]
Keeping it simple can be complicated
 
Thanks Pampers,

Your Code works excellent.

I appologize if I came across as being dis-respectful, by asking for help in the following manner: (I need to make) I should of thought to reword it more respectfully. My bad.

I really do respect all the Tek-Tip programmers and your time, in the future I will definatly be more curtious and respectful.

Thanks PHV for bringing this to my attention otherwise I may not of caught my selfish concerns.

Thanks again Pampers!!

patentinv
 
Don't worry too much...

Pampers [afro]
Keeping it simple can be complicated
 
Hello Pampers,

Thanks, I'll just need to be me more aware of my wording.

I did notice one minor thing that I'm trying to figure out, when I click the print button on my form which runs the code you genioursly gave me it will not bring up the newly entered record that is in the form the report will be blank it will be on the correct ID/record but, if I close my form and re-open it and go back to that same record and then click the print button it will bring up that record correctly in the report.

I think your code opens the report to that ID but the data has not yet been recorded in the table, it's like the table or the form must need to get refreshed so the data in the new record gets placed in the table before the report gets opened.

Is there a way to put a type of refresh statement in the code you gave me?

Thanks
patentinv
 
it will not bring up the newly entered record
...
[!]Me.Dirty = False[/!]
DoCmd.OpenReport ...

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Or maybe put some code first to save the record first, if you press the print button...

Pampers [afro]
Keeping it simple can be complicated
 
put some code first to save the record first
This is precisely what my suggestion does ...
 
Aha, is that so. Like, there can be no Me.Dirty (=false), and to avoid that, the record will be saved?

Pampers [afro]
Keeping it simple can be complicated
 
Hello MVP's,

Your code works excellent, it will now bring up the newly entered record in the report.

It makes total sense access never had a chance to save the record to the table so the report showed no data.

You MVP's are the best!!

AS you MVP's can tell my VBA skills are 0, I kinda no what I want access to do but getting it to do through writing code, is my down fall.

Thanks for all the help and giving me your time, I really appreciate it.

patentinv
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top