How to import dbf files automaticly?

yipikyer

New member
Local time
Today, 08:35
Joined
Apr 9, 2008
Messages
7
Hello all
this is my first post. I've tried to get my info without any luck so i ask my question here.... hope it's ok.

I want to import some dbase files that comes from an accounting software and ask Access some queries. The queries part is perfect. My only problem is how can i ask (in a general menu of my Access application) access to go and get those dBase files?
I want the user to be able to have a button asking him : " Do you want to import new data?. And then it will update Access. I don't need to append the data just overwrite the old data. I'm not doing any manipulation of data on the files, just asking questions. (Hope i make sense...)

They are always on the same directory on the server.

Thank you for the help!
 
Do you have access to the production dbf files? If so just link to them.
 
I'm not sure i understand. What do you mean by production files? Can you elaborate a little , please.

Thank you


Do you have access to the production dbf files? If so just link to them.
 
By dbf I assume you mean dbase files. (?) If so then can you open / get to the files that the users are entering data into? So if users are entering data into a dbase datatbase can you see the .dbf file(s) in windows explorer?
 
in the file/import/ menu item, you can select dbf files - is that what you mean?

you can also do this programatically if required
 
Yes, when i browse the u:\promgramfiles\avantages\avan01\ , i see all the *.dbf files available. You say that i can link to them directly? I think i tried this, but the date values on the dbase file are in text. I need to change it in Access to make it a date/hour field. It did'nt work in linked mode.

What do you think?


By dbf I assume you mean dbase files. (?) If so then can you open / get to the files that the users are entering data into? So if users are entering data into a dbase datatbase can you see the .dbf file(s) in windows explorer?
 
How can i do it programatically in the Access Switchboard?

I want the user to be able to have a button asking him : " Do you want to import new data?. And then it will update Access. I don't want to append the data just overwrite the old data. I'm not doing any manipulation of data on the files, just asking questions. (Hope i make sense...)




in the file/import/ menu item, you can select dbf files - is that what you mean?

you can also do this programatically if required
 
Last edited:
Several ways to do this. The most dynamic way is to link to the tables then create a query that converts the date fields. Then use this query in subsequent queries, etc.
 
I did try this and Access gave me an error: Not enough memory or HD space.
I have a new 500g hhd and 4 gig of ram!!!!



Several ways to do this. The most dynamic way is to link to the tables then create a query that converts the date fields. Then use this query in subsequent queries, etc.
 
I find it hard to believe you simply tried to link to a dbase file and got that error. Something else must be going on.

a. How big (in file size) is the dbf?
b. How big (in file size) is the mdb?

Try this: reboot your computer, create a new mdb on your local machine, copy the dbf to your local machine and then try to link to one of the tables.
 
Ok, i'll tried it tonight and post reslut afterward

Many Thanks
 
Hello!

In VBA it's easy to do it:
You can link to an external .dbf file(dbase), just need to know which exactly DBase version it is, then use the command below, and you get a table in the Ms Access where you can make your questions with queries.

DoCmd.TransferDatabase acLink, "dBase iV", FileDir, acTable, FileName, "tblTemp", False

acLink: parameter on how the DBase is connected, with acLink the table is constantly updated and you can make changes in the DBase file
FileDir: File Directory
FileName : duh :P
"tblTemp": Ms Access destination table name(if not exists creates a new one)

Hope it answered your question.
regards
mferreira
 
i think it's possible to do it without VBA.
Just make (or use existing) MakeTable Query pulling the data the way you need.
It will kill the old table and make a new one with the same name.
Than make the macro like
SetWarnings - No
OpenQuery - queryname
MsgBox - Data updated

Than make the form with the question you want.
Add 2 buttons OK and Cancel.
Connect OK button with this macro.

Here you go.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom