IMPORT Excel data into a table via button on a form.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is it possible to create a button in a form that will prompt you for an excel
file location then import that data into a table?

Thank you,
VADIMBAR...
 
Yes. You will need some method of properly locating the file. You could use
an input box, but then you would have to do extra coding to be sure the file
is there or handle an error if it is not. The most elegant way to do it is
with a common dialog box. It is an ActiveX control which comes with
licensing issued, etc. so, go to
http://www.mvps.org/access/api/index.html
and you will find some good code that will allow you to create your own
common dialog box.

Once you have the file name, you can import it however you want to.

Your code to call the dialog box and import the file should be in the Click
event of the command button
 
Back
Top