B
brownti via AccessMonster.com
I am using the below code:
Public Function saveRptsToSNP()
On Error GoTo ErrHandler
Dim rpt As Report
Dim sPath As String
Dim idx As Long
sPath = CurrentProject.Path & "\"
For idx = 0 To (Reports.Count - 1)
Set rpt = Reports(idx)
DoCmd.OutputTo acOutputReport, rpt.Name, acFormatSNP, _
sPath & rpt.Name & ".SNP", False
Next idx
Exit Function
ErrHandler:
MsgBox "Error in saveRptsToSNP( )." & vbCrLf & vbCrLf & _
"Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
Err.Clear
End Function
And would like to first check if a folder exists in that directory with the
name of a textbox. if it doesnt exists, i would like to create that folder
and then save the snap shot in that folder with the name in the textbox
followed by the date. How should i change this code to make that happen?
THank you!
Public Function saveRptsToSNP()
On Error GoTo ErrHandler
Dim rpt As Report
Dim sPath As String
Dim idx As Long
sPath = CurrentProject.Path & "\"
For idx = 0 To (Reports.Count - 1)
Set rpt = Reports(idx)
DoCmd.OutputTo acOutputReport, rpt.Name, acFormatSNP, _
sPath & rpt.Name & ".SNP", False
Next idx
Exit Function
ErrHandler:
MsgBox "Error in saveRptsToSNP( )." & vbCrLf & vbCrLf & _
"Error #" & Err.Number & vbCrLf & vbCrLf & Err.Description
Err.Clear
End Function
And would like to first check if a folder exists in that directory with the
name of a textbox. if it doesnt exists, i would like to create that folder
and then save the snap shot in that folder with the name in the textbox
followed by the date. How should i change this code to make that happen?
THank you!