Code to Create New Report

loo8866

Registered User.
Local time
Today, 10:10
Joined
Jan 11, 2007
Messages
106
Hi there, does any1 know of a line of code which creates a new report?

Ive had a try and look round the forums with no luck...

Cheers
 
Private Sub Kommando16_Click()
On Error GoTo Err_Kommando16_Click

Dim stDocName As String

stDocName = "yourReportName"
DoCmd.OpenReport stDocName, acPreview

Exit_Kommando16_Click:
Exit Sub

Err_Kommando16_Click:
MsgBox Err.Description
Resume Exit_Kommando16_Click

End Sub
 

Users who are viewing this thread

Back
Top Bottom