form to append.

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

Guest

I need to create a form that asks what files to import and I need it to
automatically append those files to a table. any suggestions????
thanks
 
hi,
you cannot append an import to an existing table. Access
alway wants to put in in a new table.
so... you will have a three step procedure
1. import...set transferspreadsheets in access help
this will get the date in a table'
2. append query to append the import data to a table of
your choise
3. a delete query to kill the new import table.
adds for file names...
you could use the imputbox function or see this site
http://www.lebans.com/callbackbrowser.htm
 
Hi Cherry,

The code here lets you use the standard File Open/Save dialog:
http://www.mvps.org/access/api/api0001.htm

This gives the Browse for Folder dialog instead:
http://www.mvps.org/access/api/api0002.htm

Then - depending on what sort of files they are - use
DoCmd.TransferText, DoCmd.TransferSpreadsheet or whatever to import
them.

To import directly to an existing table you'll need to ensure that the
structure of the external file matches the structure of the table. If
this is not the case, you'll need to link or import the external file to
a temporary table and then use an append query to move the data into the
"permanent" table while making whatever adjustments are necessary.

This is a fairly vague answer because yours wasn't a very specific
question.
 
Back
Top