ryanvb83
asked on
Using VBA, how do I create a new table in Access that contains specific data from an existing table?
I am writing a VBA module and I would like to create a table that contains some records from an existing table. I do NOT want to specifiy the field names because I want to use the module to copy several tables and they are all different. I am using the following code:
strSql = "CREATE TABLE " & Right(tbl.Name, (Len(tbl.Name) - 3)) & " SELECT * FROM " & tbl.Name & " WHERE cust_id >= " & minvalue & " AND cust_id <= " & maxvalue
DoCmd.RunSQL strSql
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.