Export form data to existing table

G

Guest

I have a Access database with hundreds of customer info.
I created a filtered form with a command button to export indivisual
customer info to Excel.
Now, I wanted to export the same filtered form data to a table in another
Access database.
I tried with TransferDatabase macro, but it would transfer ALL the
customers' info.
I just need to transfer a customer(the filtered) info.
How is this done?
 
S

Steve Schapel

Marco,

TransferDatabase should work, but you will have to use a Query that
returns the required records as the Source argument, rather than your table.

Another option is to use an Append Query, something along these lines...
CurrentDb.Execute "INSERT INTO Customers IN 'C:\YourFolder\Other.mdb'" & _
" SELECT CustomerID, CustomerName, etc" & _
" FROM YourQuery", dbFailOnError
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top