Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output report to specific folder.

Status
Not open for further replies.

prodtest

Technical User
Aug 29, 2003
55
GB
Hi,
I have a button a form which allows me to save a report to file.
I would like however to make it less user reliant, at the moment I use the code below:

Private Sub yes_Click()
On Error GoTo Err_Command6_Click

Dim stDocName As String

stDocName = "repairquer"
DoCmd.OutputTo acReport, stDocName

Exit_Command6_Click:
Exit Sub

Err_Command6_Click:
MsgBox Err.Description
Resume Exit_Command6_Click

End Sub

This works well, but the user has to select file type and then find the folder to save it in. I would like to change this so when selected it automatically selects .snp format and opens up the folder to save the file in, but still allows the user to change the file name.

Any ideas greatly appericated.

Ben
 
Hi,
Tried something else, used the line of code below as the docmd:

DoCmd.OutputTo acReport, stDocName, -acFormatSNP, "P:\Repairs_New Format\"

But from this throws up an error saying about not enough disk space !!

any ideas ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top