Full Code that Works
Ok - I have it figured - This works for me on XP & access 2007
Create New Folder And name as ReportName
Create Report PDF
Save to File (New Folder)
All in one operation - The Create File was obtained from this forum someplace so thanks to Kiwiman
Heres the code - I...
I got this to do the trick Caracena...
Dim stFileName As String, stExtension As String
stFileName = Forms!frmClaimsParts!claimID
stExtension = ".pdf"
DoCmd.OutputTo acOutputReport, "rptParts", acFormatPDF, stFileName & stExtension
The code needs to be attached to a button and the buttons...
Hi, Im using access 2007 and i'm on a steep learning curve - so forgive me if my question seems odd.
I solved(with help form you guys) how to force 2007 to send a report to file (PDF) and only the report that is current.
Now, is it possible through the embedded macro to name the report as...
Thanks all - I have it - Remembering i'm using Access 2007 - I have the query set to open just the report that relates to the passed ID as above - Also I have the report filtered with the same criteria - and set the filter to run OnLoad=Yes - This takes care of the report to file(pdf) to just...
In access 2007 there is a button to enable you to save to file as a file type EG PDF. The code behind the button is an embedded macro as shown above.
DoCmd.OutputTo acOutputReport, "rptName", acFormatPDF, , True
I can do the above no problem, but I need criteria - else the report printed...
Hi thanks for the reply.
Firstly - I tried adding to the Conditions but that doesn't work - I get a printout of all records.
The code below is attached to an open report button - This works great and opens the report with the correct ID.
Private Sub Command391_Click()
On Error GoTo...
Anyone know where the Convert macro to vba is on access2007?
else
I need this criteria set into the macro somehow
strCriteria = "[claimID]=Forms!frmClaimsParts!claimID"
& this is the macro
Report, rptParts, PDF Format (*.pdf), , Yes, , 0, Print
:)
Thanks Ziggy - I tried all that but no change of any consequence - However - I just upgraded to access2007 and guess what - The problems gone completely!
Cheers
Andy
Ok - Actually - This does open up the correct ID - and only that ID - But - If I place a Preview report button - linked to a report - I am getting all records in the report - How can I make this not so?
Cheers
Hi,
I have a search function attached to a list
Private Sub QuickSearch_AfterUpdate()
' Find the record that matches the control.
Dim rs As Object
Dim stDocName As String
Dim cType As String
Dim claimsID As Integer
Dim strSQL As String
Dim db As...
Hi, Thanks for your reply...
My images are stored in a folder - DataBase1\Pictures
The path is saved in the database - C:\DataBase1\Pictures\1202151502.jpg
The images are called on the Subform Thus
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Me![Image15].Picture =...
I have successfully got the Report to display all pictures associated with its key via a sub report linked to a query. The query selects all pictures associated with the claim.
However It loads and formats the pictures every time you change to a new page. (as so does the forms I think)
This...