madvalpreston
Technical User
HI
I have a report that is run froma quote form and as 2 buttons, one for report preview and one for email... In both cases I always want to print/email the one report for that particual quote, so I f Quote number 1 is on screen then thats all that should appear....... It is based on Survey types....
1. The code here previews the report and this works fine and only brings up the right result.
StDocName = "quotedem"
DoCmd.OpenReport Combo38.Column(2), acPreview, , "type = '" & Combo38.Column(1) & "' AND IDquote = " & idquote
2. I now want to email this to a the client in an email and use the client email address.... the code below works to the point of the report itself
'DoCmd.SendObject acSendReport, Combo38.Column(2), acFormatPDF, cboQclientid.Column(3), , , "Asbestos Surveyors UK Quotation", , , "type = '" & Combo38.Column(1) & "' AND IDquote = " & idquote
What is happening is, if a survey type as more than one quote (example combination as 2 quote records) then the report shows the full 2 reports instead of just the one (like the preview does in number 1)...
I have tried all sorts to the code but I cannot figure out how to email just the valid quite that is active
Does anyone have any ideas how I can do this
Thanks
I have a report that is run froma quote form and as 2 buttons, one for report preview and one for email... In both cases I always want to print/email the one report for that particual quote, so I f Quote number 1 is on screen then thats all that should appear....... It is based on Survey types....
1. The code here previews the report and this works fine and only brings up the right result.
StDocName = "quotedem"
DoCmd.OpenReport Combo38.Column(2), acPreview, , "type = '" & Combo38.Column(1) & "' AND IDquote = " & idquote
2. I now want to email this to a the client in an email and use the client email address.... the code below works to the point of the report itself
'DoCmd.SendObject acSendReport, Combo38.Column(2), acFormatPDF, cboQclientid.Column(3), , , "Asbestos Surveyors UK Quotation", , , "type = '" & Combo38.Column(1) & "' AND IDquote = " & idquote
What is happening is, if a survey type as more than one quote (example combination as 2 quote records) then the report shows the full 2 reports instead of just the one (like the preview does in number 1)...
I have tried all sorts to the code but I cannot figure out how to email just the valid quite that is active
Does anyone have any ideas how I can do this
Thanks