Updating a field in access with a range of cells

ASHRAF_AL_ANI

New Member
Joined
Jan 25, 2017
Messages
18
Dear All
I want to update a column in an access table with a range of cells values without effecting other columns in that table
please how can I do that using VBA

thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
Can you explain in more detail?
Maybe, walk us through an example of exactly what it is you are trying to do?
 
Upvote 0
Thanks for replay
what I am trying to do
I have a database called compare.accdb it has a table called main
the main table has 3 columns id,date,info all columns have information except info
I have an excel sheet called info

I want to updated main table just column info with the information that I have in my excel sheet starting from c1 till c100

I hope I explained my problem good

many thanks
 
Upvote 0
You can link your Excel table into Access.
Then, you can link your Excel table to the Access table, providing that you have some common field to join on.
You can then create an Update Query to update the Info field (from the Excel file to the Access table).
 
Upvote 0
thanks for replay but cant I do it with a VBA code just inserting these cells in my access table field? I mean by inserting c40 in record 40 from table INFO and c60 to record 60 and so on?
many thanks
 
Upvote 0
thanks for replay but cant I do it with a <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-top-style: initial; border-right-style: initial; border-bottom-style: dotted; border-left-style: initial; border-top-color: initial; border-right-color: initial; border-bottom-color: rgb(0, 0, 0); border-left-color: initial; border-image: initial; cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250);">VBA</acronym> code just inserting these cells in my access table field? I mean by inserting c40 in record 40 from table INFO and c60 to record 60 and so on?
I do not think that is an easy thing. I would not know how to do that. You really cannot link just certain Excel cells to certain record fields in an Access table. Either the whole table is linked or it isn't. In theory, you probably can come up with VBA code to do just about whatever you want, but it could be a bit complex.

I would recommend re-thinking your process.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,221,700
Messages
6,161,371
Members
451,700
Latest member
Eccymarge

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top