ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Updating database from excel sheet with macro (https://www.excelbanter.com/excel-programming/285388-updating-database-excel-sheet-macro.html)

Suzana

Updating database from excel sheet with macro
 
Hi

I am trying to write a macro that generates report by two diffrent
ms-querys.
Part of data that came from ms query1 is read only for the user(if
user change this data it is not effecting on the database)
The second part of data came from ms query2 and that part should be
able to update the database if the data change

Should I call to this ms query2 in a diffrent way and the data
automaticly will be sincronized? then how???

Or should I call to this ms query2 regular and then add a button that
update the database after all changes? then how???

thanks
Suzana


BrianB

Updating database from excel sheet with macro
 
A query is one-way only. If you want to update the orignal data you
will have to write a macro that runs through the Excel sheet one
record at a time, finds itself on the original data and replaces cell
values there.

Regards
BrianB
==================================================




(Suzana) wrote in message . com...
Hi

I am trying to write a macro that generates report by two diffrent
ms-querys.
Part of data that came from ms query1 is read only for the user(if
user change this data it is not effecting on the database)
The second part of data came from ms query2 and that part should be
able to update the database if the data change

Should I call to this ms query2 in a diffrent way and the data
automaticly will be sincronized? then how???

Or should I call to this ms query2 regular and then add a button that
update the database after all changes? then how???

thanks
Suzana


Suzana

Updating database from excel sheet with macro
 
Hi Brian

Thank you for your replay. Can you send me an example for this case?
I should use sqlopen/sqlclose functions? I can't find a help to sql
functions on the vba help. Where can I find a help for this topic?

Thanks
Suzana






(BrianB) wrote in message om...
A query is one-way only. If you want to update the orignal data you
will have to write a macro that runs through the Excel sheet one
record at a time, finds itself on the original data and replaces cell
values there.

Regards
BrianB
==================================================




(Suzana) wrote in message . com...
Hi

I am trying to write a macro that generates report by two diffrent
ms-querys.
Part of data that came from ms query1 is read only for the user(if
user change this data it is not effecting on the database)
The second part of data came from ms query2 and that part should be
able to update the database if the data change

Should I call to this ms query2 in a diffrent way and the data
automaticly will be sincronized? then how???

Or should I call to this ms query2 regular and then add a button that
update the database after all changes? then how???

thanks
Suzana



All times are GMT +1. The time now is 05:39 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com