![]() |
Transfer data from Excel to Access
Can anyone help me create some code that will do the following?
I need to upload/transfer specific cells in Excel to an existing table in Access. These cells are specific to records in my table. For example, "C1" needs to be uploaded to "tblPrice". The field it needs to be put in is "Surcharge". The record is "10". How do I write the code to make this happen? Any help would be greatly appreciated. I'm not the familiar with writing this type of code. |
Transfer data from Excel to Access
hi,
I think it would be easier to link the excel table to access. this way any changes made to the excel table(named range) would automaticly reflect in Access. You would need to write code to resize the excel table(named range) on file exit in case you have added new records to the excel table. Access would view the linked excel table as an access table. you could then write an update query in access to transfer the data and access has a wizard for that. code to resize excel table Range(Range("A65500").End(xlUp), _ Range("A65500").End(xlUp).End(xlUp).Offset(0, 2)).Select ActiveWorkbook.Names.Add Name:="MyRange", RefersTo:= _ Selection use the file close event so you don't forget and you can also add a button or icon. after thought. down load your access table to excel, make the changes there. regards FSt1 "Secret Squirrel" wrote: Can anyone help me create some code that will do the following? I need to upload/transfer specific cells in Excel to an existing table in Access. These cells are specific to records in my table. For example, "C1" needs to be uploaded to "tblPrice". The field it needs to be put in is "Surcharge". The record is "10". How do I write the code to make this happen? Any help would be greatly appreciated. I'm not the familiar with writing this type of code. |
All times are GMT +1. The time now is 08:44 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com