I have the follwoing code behind my command button:
----------------------------------
Function Appaoo()
On Error GoTo Appaoo_Err
DoCmd.OpenQuery "001qryDelOldRecords", acNormal, acEdit
DoCmd.TransferText acImportDelim, "14&16IN Import Specification", "14&16IN0205Template", "H:\Billing\Switch CDRs\14&16IN" & "*.csv", False, ""
DoCmd.OpenQuery "qryUpdateInTableOnlySS7to2", acNormal, acEdit
DoCmd.OpenQuery "qryUpdateOutTableOnlySS7to1", acNormal, acEdit
DoCmd.OpenQuery "UpdQryCopyCicOutToCicInIfZero", acNormal, acEdit
DoCmd.OpenQuery "UpdQryCopy9915toCicOutIf0", acNormal, acEdit
Beep
MsgBox "IMPORT COMPLETE ! All Files were imported correctly!", vbOKOnly, "FILES IMPORTED INTO DATABASE"
Appaoo_Exit:
Exit Function
Appaoo_Err:
MsgBox Error$
Resume Appaoo_Exit
------------------------------------
How do I get it to import my file H:\Billing\Switch CDRs\14&16IN0205.csv when the 0205 part changes each month?
I tried my code at the top but it says: You cannot import this file.
Thanks in advance for your help!
jlig
----------------------------------
Function Appaoo()
On Error GoTo Appaoo_Err
DoCmd.OpenQuery "001qryDelOldRecords", acNormal, acEdit
DoCmd.TransferText acImportDelim, "14&16IN Import Specification", "14&16IN0205Template", "H:\Billing\Switch CDRs\14&16IN" & "*.csv", False, ""
DoCmd.OpenQuery "qryUpdateInTableOnlySS7to2", acNormal, acEdit
DoCmd.OpenQuery "qryUpdateOutTableOnlySS7to1", acNormal, acEdit
DoCmd.OpenQuery "UpdQryCopyCicOutToCicInIfZero", acNormal, acEdit
DoCmd.OpenQuery "UpdQryCopy9915toCicOutIf0", acNormal, acEdit
Beep
MsgBox "IMPORT COMPLETE ! All Files were imported correctly!", vbOKOnly, "FILES IMPORTED INTO DATABASE"
Appaoo_Exit:
Exit Function
Appaoo_Err:
MsgBox Error$
Resume Appaoo_Exit
------------------------------------
How do I get it to import my file H:\Billing\Switch CDRs\14&16IN0205.csv when the 0205 part changes each month?
I tried my code at the top but it says: You cannot import this file.
Thanks in advance for your help!
jlig