Exporting Data To Access

G

gatarossi

Dear all,

I have a sheet like that:

The range a1 contains the profit center code
The range a2:a65536 can contains the accounting code
The rage b1:iv1 can contains the period
a b c d
1 admin 01/01/07 01/02/07 01/03/07 . . .
2 10 100 102 103
3 20 50 55 60
4 30 40 45 40
..
..
..
Then I have an access file (test.mdb) and a table (expense):

The table is like that:
accounting_code profit_center period values_R$
10 admin 01/01/07
100
10 admin 01/02/07
102
10 admin 01/03/07
103
20 admin 01/01/07
50

Then I would like to receive help for the VBA code or anything else
that can help me in this problem:

I need a VBA code that when I click in a button, the excel export all
data to access: but if access already had data for this combination
accounting_code, profit_center and period, excel only update the
value, if access doesn't have this information, include this
combination and value, and if access have one account and period for
this profit_center that doesn't stay in this new exportation, delete
it.

I can have as period and accounting code as the user wish.

Thanks a lot for your help!!!!

André.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top