Append several Tables at once to another databse

A

Andrew

I have a database that contains a group of tables (5) whos data needs to be
transfered to a server database from laptops. I Intend on using an append
query. One form from the laptop databases hooks to all the other forms and
the users usually go back to the form (or can be forced to) at close of the
others. Can I place a control on this form that contains code that will open
all the append queries and sends the data to the database server, or do i
need to put a control a seperate control on the form that sends data
individully? If A control can handle it all what would the code be.
 
G

Gina Whipp

Andrew,

One way, you can put a button on a form with the following..

Private Sub cmdYourCommandButtonName_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.SetWarnings True
End Sub

Might want to include some error handling.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 
A

Andrew

Thanks Gina,

This would be the second time you have assisted me! if this works, it will
be the second time your soulutions have worked as well.
--
Andrew
H.W. Lochner


Gina Whipp said:
Andrew,

One way, you can put a button on a form with the following..

Private Sub cmdYourCommandButtonName_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.OpenQuery "YourAppendQueryNameHere"
DoCmd.SetWarnings True
End Sub

Might want to include some error handling.

--
Gina Whipp

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm
 

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