importing with macro or code

chr1stoper1

Registered User.
Local time
Today, 14:11
Joined
Mar 29, 2015
Messages
17
hi folks

I'm fairly new to access and am working my way through database problems by building my database with your help and reading former posts. My latest question is how to best import my data using vba or a macro.
I import data direct to the tables from excel manually on a daily basis and would prefer to upload automatic or on a button.
Any help in pointing me in the best direction would be appreciated as always
 
get your new excel file
save to the same generic file everytime: file2Import.xls
link this file as a table, tblXLfile2Import
build a query to append data from tblXLfile2Import to your target table, qaImportXL
put this query in a macro, mImportXLfile

now your steps will be:
1. save latest excel file to file2Import.xls
2. run macro: mImportXLfile
done.
 
try that and it did the trick thank you very much for the help
 
Hi guys

The append query works great got the macro working off a command button but I have another slight problem now with the data that is imported. I think it must be importing the whole excel worksheet because I have lots of blank entries at the bottom of my table that is being populated by the import . Any ideas as to the best way around this?
Help is always apreciated
 
Solved that with a simple is not null on the append query ... think I had brain freeze .
 

Users who are viewing this thread

Back
Top Bottom