tg4fsi
asked on
Code to Import a Multi Value Field in Microsoft Access
I am in need of some VBA code to import and convert data into an Access multi-value field.
Yes, I know I should not be using them but I have no choice. I work in ecommerce and I get CSV exported data in the following format:
Products
--------
ProductCode, CategoryIDs
Example:
"Red Widget", "1,3,5"
"Blue Widget", "3"
Categories
----------
CategoryID, CategoryName
Example:
"1", "Furniture"
"3", "Tables"
I need to run data analysis on our store so I need to bring in the data and create the relationships. I will also need to eventually export the data in the same format which is why I am staying with the multi-value field. Since I cannot import into a multi-value field I figured this method would work:
1. Import the Products into a temporary table: _tblProducts
2. Using VBA code, append the data to a Products table and at the same time populating the multi-value field with the category IDs.
So I'm looking for the code that will cycle through _tmpProducts and append the data to the table Products while properly filling Products!CategoryIDs multi-value field.
Thanks,
Erik
Yes, I know I should not be using them but I have no choice. I work in ecommerce and I get CSV exported data in the following format:
Products
--------
ProductCode, CategoryIDs
Example:
"Red Widget", "1,3,5"
"Blue Widget", "3"
Categories
----------
CategoryID, CategoryName
Example:
"1", "Furniture"
"3", "Tables"
I need to run data analysis on our store so I need to bring in the data and create the relationships. I will also need to eventually export the data in the same format which is why I am staying with the multi-value field. Since I cannot import into a multi-value field I figured this method would work:
1. Import the Products into a temporary table: _tblProducts
2. Using VBA code, append the data to a Products table and at the same time populating the multi-value field with the category IDs.
So I'm looking for the code that will cycle through _tmpProducts and append the data to the table Products while properly filling Products!CategoryIDs multi-value field.
Thanks,
Erik
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER