Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

copy block of data from table to table?

Status
Not open for further replies.

xq

Programmer
Jun 26, 2002
106
NL
i'm doing a userform which is in a datasheet form, that allow user to in put data as much as they can and save into table1, after they click the bottun OK, then i'll copy all those block of data to table2, all i can do is select each in each field and each record from table1 and insert into table2, is there any other better way of doing these?
thanks million for any help!
 
Use an Append Query. Set it up to select all data from table1 and append it to table2.Start a new query in design view and select the Query menu, select append query and it's all self explanatory from there

Cheers,

Pete
 
thanx, but i would like it's done in the code, user only have to input data and click button OK, all the data is copied automatically into table2. sorry i didn't say that clearly.
 
So put:

DoCmd.OpenQuery "YourAppendQuery"

in the on click event of the ok button. If you REALLY REALLY want no trace of a query then use a DoCmd.runSQL with a SELECT...INTO statement.

Cheers,

Pete
 
i got it! thanks a lot!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top