I've recently split a DB. I've attached two db's to show my problem.
First use TestDBGood
Within tbl Export New IPG Customers, their exists 44 new customers. These customers need to be inserted into individual tables based on the field "Acct Type".
Within form frm Import Data, here is what my code is suppose to do:
1. Create a recordset containing the customer data sorted by the "acct type" field
2. Read first record
3. Assign variables to all fields
4. Check to see if this acct type matches previous acct type. Initially the variable is set to null
5. With it being a new acct type, copies a table using a table template and assigns the table name to be associated with the acct type
6. Adds the record to the new table
7. Loop
As an example, if this code runs properly, this is what the results should be:
1. two tables named: IPG Cust - Other, IPG Cust - Retail
2. table Other contains 3 records, table Retail contains 41 records.
Now use TestDBBad
What happens is all records are within both newly created tables, and they are also within the template table.
Any suggestions would help!!
First use TestDBGood
Within tbl Export New IPG Customers, their exists 44 new customers. These customers need to be inserted into individual tables based on the field "Acct Type".
Within form frm Import Data, here is what my code is suppose to do:
1. Create a recordset containing the customer data sorted by the "acct type" field
2. Read first record
3. Assign variables to all fields
4. Check to see if this acct type matches previous acct type. Initially the variable is set to null
5. With it being a new acct type, copies a table using a table template and assigns the table name to be associated with the acct type
6. Adds the record to the new table
7. Loop
As an example, if this code runs properly, this is what the results should be:
1. two tables named: IPG Cust - Other, IPG Cust - Retail
2. table Other contains 3 records, table Retail contains 41 records.
Now use TestDBBad
What happens is all records are within both newly created tables, and they are also within the template table.
Any suggestions would help!!