Add Excel data to Access

H

Huaqin

hi all,

I'd like to add a command button "Add" on my worksheet to automatically
populate all data (about 50 rows every time) to an Access table "tbl_input"
with special condition. Please see example below:

data on worksheet starting cell B3,
A 20 20 40 20 40
A 40 30 40 30 30
B 30 60 20 30 50
C 100 80 60 80 40
.......

I'd like the VBA code (macro) to populate the data in this way please.
for data "A 20 20 40 20 40", I'd like to put "A" in "size" field of
"tbl_input" in Access db, "20" in field "A1", the next "20" in field "A2",
and so on....

for data "B 30 60 20 30 50", put "B" in "size" field" of "tbl_input" in
the same db, the put the rest in field "B1", "B2", "B3", and so on...

similarly for data "C 100 80 60 80 40", in "Size", "C1", "C2",....

Thanks in advance for your help!
 

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