VBA Question

  • Thread starter angelinarose via AccessMonster.com
  • Start date
A

angelinarose via AccessMonster.com

Hi all,

I need some help with VBA

1:what I need to do is import a spreadsheet from excel and place it into a
table already named.
2:while it is importing I would like for it to capture the file name and
place it into it's own table.
3:then I want to update the import table with the filename in each record.

I have the import figured out but I'm totally lost on the rest. I'm fairly
new to access and have no idea how to do this.

HELP!!
thanks in advance
Angel
 
J

Jeanette Cunningham

angelinarose,
assuming that you are running this vba from a form,
your code will capture the name of the file to import, either from the
file/open/save dialog or it will be given some other way.
Save this file name in either a variable in the procedure or in an unbound
text box.
After you finish the import, run an append query to put the file name in the
ImportName field for each record you just imported.

Jeanette Cunningham
 
Top