Cosmos75
Registered User.
- Local time
- Today, 09:01
- Joined
- Apr 22, 2002
- Messages
- 1,281
I have this code behind a button on my form.
How do I set the file path to the same directory as the database? Or a folder named Reports that is in the folder that the database is in?
Also, I keep getting this error message when I press the button.
"The report snapshot was not created beaces you don't have enough free disk space for temporary work file."

PHP:
Dim stDocName As String
Dim Person As String
Dim ReportType As String
Dim StartWeek As Date
Dim EndWeek As Date
Dim NameReport As String
Dim FileName As String
Person = Me.LstPeople.Column(1)
Office = Me.LstOffice
StartWeek = Me.LstStartWeek
EndWeek = Me.LstEndWeek
If Me.FrameOption = 1 Then
stDocName = "rptProductivityDateRangePerson"
ReportType = "Person"
NameReport = ReportType & "-" & Person
Else
stDocName = "rptProductivityDateRangeOffice"
ReportType = "Office"
NameReport = ReportType & "-" & Office
End If
FileName = NameReport & " for period " & StartWeek & " - " & EndWeek
DoCmd.OutputTo acReport, stDocName, "SnapshotFormat(*.snp)", FileName, True, ""
How do I set the file path to the same directory as the database? Or a folder named Reports that is in the folder that the database is in?
Also, I keep getting this error message when I press the button.
"The report snapshot was not created beaces you don't have enough free disk space for temporary work file."
