If you want to make a new table from the existing table . For example below code will create a new table name "rep_name_a " from existing table "sales_details" of all the records where the rep name is equal to "A"
Code-
Sub make_new_table_from_existing_table()
DoCmd.SetWarnings (False)
DoCmd.RunSQL "SELECT * INTO rep_name_a FROM sales_detail WHERE [rep name] = 'a'"
DoCmd.SetWarnings (True)
End Sub
Download Database
No comments:
Post a Comment