VBA or SQL code? -- need help!
Hi, I need help in determining if the answer to cleaning my data will be in VBA or SQL. Then, I'll proceed in finding an expert to help me write the code.
Background: I work for an apparel company that imports clothes from all over the world. I work in the import compliance group, and I've been told that it isn't an option to get our IT involved.
I've built a fairly complex Access database to house and query data that we get from customs brokers. The amount of records imported per month is around 20,000+. I know that we'll need to upgrade out database soon, but until we can show off our database's cabilbilities it won't happen soon.
Problem: We import a field called [Prepaid Freight] that gets summary level data duplicated for every related record. When in fact, we actually want that summary level prorated accross all the related records.
THIS IS HOW THE DATA COMES:
Example: Entry Number Prepaid Freight Entered Value
123456 $100.00 $400
123456 $100.00 $200
123456 $100.00 $600
--------------------------------------------------------------------------
THIS IS HOW IT NEEDS TO BE (I.E. CLEANED)
Example: Entry Number Prepaid Freight Entered Value
123456 $40.00 $400
123456 $20.00 $200
123456 $60.00 $600
As one can see, the Prepaid freight of $100 needs to be determined by the prorating all the entries againt thier Entered Value.
This is a huge problem because the number of entries that need to be prorated vary. Sometimes there are two entries, and other times up to six entries need to considered.
So, I want to have some code written to account for cases of no proration w/ one entry, up to cases when there are six entries that share the same summary level Prepaid freight that needs to be prorated out.
If anybody knows how I can solve this problem it would be greatly appreciated. I'm new to Access and VBA so I don't have any idea where to begin looking for help.
Thanks,
Lynniebabe