another import DBF question

blue weasle

Registered User.
Local time
Today, 06:42
Joined
Sep 8, 2004
Messages
14
I've searched and searched but can seem to come up with an answer for my particular problem. I have a dbf table (well two actually but lets keep this simple) that are in a different location every day (folder name based on date). I came up with the following code but i get "Access can not find the database you requested. check file name". I've used this in the past with not problems (a simpler version anyway). Since I've used it in the past, I've changed computers, is there a setting problem I'm missing??

Here's the code:

Private Sub ImportInvpertDBF_Click()
On Error GoTo Err_ImportInvertDBF_Click


DoCmd.SetWarnings False
path = ahtCommonFileOpenSave
DoCmd.TransferDatabase acImport, "dBase 5.0", path, acTable, , "tmp_strInverts", False
DoCmd.OpenQuery "qryAppendInvertTbl", acViewNormal, acEdit
DoCmd.DeleteObject acTable, "tmp_strInverts"
DoCmd.SetWarnings True
MsgBox "Import Successful", vbInformation, "Import Table"


ImportInvertDBF_Click:
Exit Sub

Err_ImportInvertDBF_Click:
MsgBox Err.Description
Resume ImportInvertDBF_Click

End Sub

I have the module for Path=ahtCommonOpenSave working in other imports fine so I figure that's not my problem.

The dbf files are comming from a field collection crew daily and I just want them to have a one click option to find the dbf's and import them into the DB.

Any help?

Thanks Folks!

Eric
 

Users who are viewing this thread

Back
Top Bottom