T
trasco
Hello,
I am trying to get a csv file, todaysptappts.csv to import into an access
table, Todaysptappts, twice a day at a certain time. Each time the file
will overwrite the table.
The database will be left open 8a-5p. It's on a network, in a different file
folder than the file I want to import. I have gotten a manual import to work
with a macro, using a file spec, "Todaysptappts Import Specification", but I
would like to attach this code to the database switchboard form, as an
ontimer event. I've tried writing code to get it to import once a day, for
starters, but get a syntax error .
My code is:
Private Sub Form_Timer()
If Time >= #4:24:00 PM# And Time < #4:27:00 PM# Then
DoCmd.TransferText(TransferType=acImportDelim,
Todaysptappts_Import_Specification,todaysptappts,"\\filefolder1\filefolder2\
filefolder3\filefolder4\filefolder5\filefolder6\filefolder7\todaysptappts.
csv",0,,)
Else
Cancel
End If
End Sub
Can someone plz point me in the right direction??
I am trying to get a csv file, todaysptappts.csv to import into an access
table, Todaysptappts, twice a day at a certain time. Each time the file
will overwrite the table.
The database will be left open 8a-5p. It's on a network, in a different file
folder than the file I want to import. I have gotten a manual import to work
with a macro, using a file spec, "Todaysptappts Import Specification", but I
would like to attach this code to the database switchboard form, as an
ontimer event. I've tried writing code to get it to import once a day, for
starters, but get a syntax error .
My code is:
Private Sub Form_Timer()
If Time >= #4:24:00 PM# And Time < #4:27:00 PM# Then
DoCmd.TransferText(TransferType=acImportDelim,
Todaysptappts_Import_Specification,todaysptappts,"\\filefolder1\filefolder2\
filefolder3\filefolder4\filefolder5\filefolder6\filefolder7\todaysptappts.
csv",0,,)
Else
Cancel
End If
End Sub
Can someone plz point me in the right direction??