Dear Mr Allen,
I've read your tip ( for progammer ),but I still need guidance ( as
beginner )
Below are my code :
Dim strPath As String
Dim strModel As String
Dim strLotNo As String
strPath = Application.CurrentProject.Path
strModel = Me.Model
strLotNo = Me.LotNo
If Me.[Rotation speed No].Value = 1 Or _
Me.[Rotation speed No].Value = 4 Then
DoCmd.SetWarnings False
DoCmd.OpenQuery "Retrieved data access prt_qry", acViewNormal
DoCmd.OutputTo acOutputReport, "Electrical Report 1", acFormatSNP,
strPath & "/" & strModel & " Lot no " & strLotNo & ".snp", True
DoCmd.OpenQuery "Append email log_qry", acViewNormal
DoCmd.SetWarnings True
Else
DoCmd.SetWarnings False
DoCmd.OpenQuery "Retrieved data access prt_qry", acViewNormal
DoCmd.OutputTo acOutputReport, "Electrical Report ", acFormatSNP,
strPath & "/" & strModel & " Lot no " & strLotNo & ".snp", True
DoCmd.OpenQuery "Append email log_qry", acViewNormal
DoCmd.SetWarnings True
End If
How and where to put your code.Let say i wanna have folder 'Result' beside
my DB.
How start writing the code.
And please explain about MkDir.
If the folder does not exist, use MkDir to create it.
Thank's
Allen Browne said:
See:
FileExists() and FolderExists() functions
at:
http://allenbrowne.com/func-11.html
If the folder does not exist, use MkDir to create it.