Topics Search

Exporting single record from a FORM to PDF

Exporting single record from a FORM to PDF
Views: 58
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] = " & _
![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] = " & _
![propref]
DoCmd.OutputTo acOutputForm, "FrmPropertyAttributes", acFormatPDF, "" & ![propref] & ".pdf"
.MoveNext
Loop
End With
MyRS.Close
Set MyRS = Nothing End Sub
Sponsored Links:

More topics

 

Exporting Reports Question

Preview
-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?
 

Display pdf attachment in report

Preview
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 Record

Preview
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.
 

Export single record from a form to PDF

Preview
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] = " & _
![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] = " & _
![propref]
DoCmd.OutputTo acOutputForm, "FrmPropertyAttributes", acFormatPDF, "" & ![propref] & ".pdf"
.MoveNext
Loop
End With
MyRS.Close
Set MyRS = Nothing End Sub
 

Multiple Reports to Single PDF

Preview
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.
 

MACRO for emailing a single record

Preview
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
 

Link PDF files

Preview
What would be the best way to link pdf files in an Access database form?

For each record there could be more then one pdf file. I would like to automate the process as much as possible. The pdf file would exist on a network drive and the user would need to go to their record in Access and then link the pdf files.

I started but am having problems with Access not opening the pdf file, it will open word files but not pdf,
 

Exporting Report to a word file or PDF or whatever

Preview
I get there is a button by the wizard that can make me export a report to ms word. Its quite cool but what I want to do is to ecport a report top ms word for a single record by this button.how do I code it
 

Exporting to PDF

Preview
I am using MS Access 2003. Is there a way to have an acces report automatically export to a pdf?
 

exporting report to PDF with specific results

Preview
I have a report which I need to export to a PDF with a certain filename. I have a PDF printer installed but its not the default so the code would need to specify the printer Named "PDF_Writer"
The report needs to be exported with a certain filename. 2 parts of the filename need to be derived from a form.