Prompt Export Save Location

mardi 3 mars 2015

Hi there, i have an export to txt file on my form which uses the following code (sorry yet to hit post code to do it properly) :(



Private Sub redlineBtn_Click()



On Error GoTo Err_redlineBtn_Click





Dim jobID As Long

jobID = Me.jobNumber

DoCmd.OpenReport "rpt_redlineText", acViewPreview, , "jobNumber = " & jobID

Reports!rpt_redlineText.Visible = False

DoCmd.OutputTo acReport, "rpt_redlineText", acFormatTXT, siteName & " (" & siteID & ") " & "Redline Log.txt", True, "", 0

Beep

MsgBox "Export Complete!", vbInformation, "Complete"

DoCmd.Close acReport, "rpt_redlineText"



Exit_redlineBtn_Click:

Exit Sub



Err_redlineBtn_Click:

MsgBox Err.Description

Resume Exit_redlineBtn_Click





End Sub



This does work however it defaults to the desktop - i can't set a static location as that location will vary from record to record



Any ideas on how to get it to prompt for a save location instead??



Thanks in advance

Prompt Export Save Location

0 commentaires:

Enregistrer un commentaire

Labels