Topics Search

Export single record from a form to PDF

Export single record from a form to PDF
Views: 126
I am having trouble exporting single records from a form to pdf.
I have the following code so far. but it gives:

Run time error 3464
Data type mismatch in criteria expression.

Debug highlights:
Me.RecordSource = "Select * From Propertyextract Where [propref] = " & _

Private Sub cmdExportPDF_Click() Dim MyDB As DAO.Database
Dim MyRS As DAO.Recordset
Dim strSQL As String
strSQL = "Select Propertyextract.[propref] From Propertyextract;"
Set MyDB = CurrentDb
Set MyRS = MyDB.OpenRecordset(strSQL, dbOpenForwardOnly)
With MyRS
Do While Not MyRS.EOF
Me.RecordSource = "Select * From Propertyextract Where [propref] = " & _
DoCmd.OutputTo acOutputForm, "FrmPropertyAttributes", acFormatPDF, "" & ![propref] & ".pdf"
End With
Set MyRS = Nothing End Sub
Sponsored Links:

Similar posts...


Export Single Record

Export Single Record Icon
Is there a way to export a single record from an Access 2007 form? It can be exported to Excel or as a PDF or text file. For example if my data source has 100 records I just want to export record 5. If I need to explain this further just let me know.

Form export to PDF with linked images

Form export to PDF with linked images Icon
Using Access 2007 I have a form that works perfectly with "on Current" event using

Private Sub Form_Current()
Image.Picture = ProductPicture
End Sub

This routine uses the linked jpg ProductPicture file to display the relevant product picture for each record in the table.

My issue is that when I try to export the form as a PDF all the records come over into the report but the picture doesn't change with the change of each record. The first image is repeated for each table record.

Export Datasheet to Pdf with a caption

Export Datasheet to Pdf with a caption Icon
I have a specific datasheet form that I export to Pdf format. How can I get the Datasheet title to display at the top of my pdf document?

Display pdf attachment in report

Display pdf attachment in report Icon
I have a table that contains data pertinent to parts which are manufactured. For each record I have a part number, revision, manufacturer etc. I also have an attachment dataset which contains a single pdf.

I would like to generate a report that has one record per page and displays the pdf attachment.

Generating and formatting the report is no problem, but my pdf attachment only shows up as the acrobat icon.

my vba is pretty weak. If there is a better way of going about printing pdf attachments I am open to suggestions.

export single access record

export single access record Icon
is it possible to export through vba a single record and add it to the next blank line in excel

Exporting Reports Question

Exporting Reports Question Icon
-Access 2007
-Adobe Acrobat 8 Professional

Currently our users are exporting reports one-by-one and then combining them after to a single pdf for printing.

Is there a way to export multiple reports to a single pdf file from Access?

Export to PDF Document Format

Export to PDF Document Format Icon
Contrasting to Access 2007, in which you need to install add-ins to export database. Access 2010 offers option of exporting database in PDF (Portable Document Format) and XPS (XML paper Specification) formats. Now with Access 2010, you can export datasheet, Forms and Reports to a .pdf or .xps file, it enables you to spread information in an easy-to -distribute form that contains all formatting characteristics.

MACRO for emailing a single record

MACRO for emailing a single record Icon
me please. I am very new to Access

I have created a database for recording Quality issues from various customers. I have also created a FORM for ease of entry of data. What I want to do is create a BUTTON for this FORM that when clicked will create a PDF of the current record only and attach it to an email. I have tried to use the SendObject action and have set up the email side of things but the problem I have is that the PDF that has been created has ALL of the records listed in it and not a singular record.

I suppose a macro similar to PRINT RECORD would be required.

Would this be able to be done as a macro or would VB be required?

I hope to hear from someone soon

Multiple Reports to Single PDF

Multiple Reports to Single PDF Icon
I am working on a database for my company in Access right now and one of the Forms that I have created can generate a single PDF file based on a report. I would rather have this done another way though.

I want a user to be able to select multiple checkboxes on the form, which will determine what reports the user needs. The next thing that it will need to do is take all these reports and generate a single PDF containing each one of these selected checkboxes.

Automatically name a report when exporting to PDF

Automatically name a report when exporting to PDF Icon
I have a form with a command button that opens my report in print preview mode in Access 2007. When I click the Export to PDF/XPS button, the default file name is the name of the actual report within Access. I've used VBA to change the report caption to match a field on my form called PROGRAM. However, this does not transfer over when I want to save my report to pdf.

How can I make it so that when I click export to pdf/xps, the default file name is named after a text box called PROGRAM?