Code: Select all
Private Sub cmdImportCAP_Click()
Dim strMonth As String
strMonth = InputBox("Enter 3 letter abbreviation for month.")
If Not Len(strMonth) = 3 Then
MsgBox "Invalid - try again.", vbExclamation
Exit Sub
End If
DoCmd.TransferText acImportFixed, "CAP 2007", "CAP ", _
"R:SMGR HMOS 2009\AETNA 2009\& strmonth &\CAP FILES\SPECIALTY CAP\G0034V00.txt", False, ""
Beep
MsgBox "CAP FILE IMPORTED !!!", vbInformation, "CAP DATA IMPORTED"
DoCmd.Close
End Sub
"R:SMGR HMOS 2009AETNA 2009 MAR 2009CAP FILESSPECIALTY CAPG0034V00.txt", False, ""
when I should have supplied this line:
"R:SMGR HMOS 2009\AETNA 2009\MAR 2009\CAP FILES\SPECIALTY CAP\G0034V00.txt", False, ""
(the slashes were left out on the original post by me)
I am now receiving the error message ".....path not found...."
What do I need to modify to get this to work?
Thank you.
Michael