![]() |
Add Excel data to Access
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! |
Add Excel data to Access
Start he
http://www.erlandsendata.no/english/...php?t=envbadac "Huaqin" wrote: 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! |
All times are GMT +1. The time now is 08:54 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com