Link to home
Start Free TrialLog in
Avatar of davetough
davetough

asked on

having option to insert data from 1 table to multiple different tables

exporting data from table and deleting data in table after data exported:

Usually when I move data from 1 table to another and then have data deleted after exported- i will write something like:

Insert into tbl1
select tbl2.*
From tbl2;
//and to delete
Delete tbl2.[ser no], tbl2.[item number], etc...
From tbl2
Where (((tbl2.[ser num] IS NOT NULL)));
But now I am confused- I have a database with 25 tables and user wants capability to send data from any one of 25 tables to any one of other 25 tables-( also deleting data from table after sent)
Is there any short way of doing this?
I have only used command button ot send do it between 2 tables.
thank you
Avatar of davetough
davetough

ASKER

yes and all tables have same fields
ASKER CERTIFIED SOLUTION
Avatar of peter57r
peter57r
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
hello peter57r,
am attaching database sample - having trouble with select statement not sure why?
do you any reason for problem
thank you
sample.mdb
Sorry, my copy and paste lost a ".
Change this line..

Strsql = "Insert into " & forms!frmExportTables!cboTblTo & " Select * from " & forms!frmExportTables!cboTblFrom
thank you