ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   UPDATE Query (https://www.excelbanter.com/excel-worksheet-functions/236749-update-query.html)

fi.or.jp.de

UPDATE Query
 
Hi All,

I have userform in excel to search & get data from Access database.

I need to update some values from excel to access.

Right now i am using this code

txt1 = trim(userform1.textbox1.value)
txt2 = Trim(userform1.textbox2.value) ( This is Auto generated number
in Access table )

sSQL = "UPDATE table1 SET table1.[account number] = " & txt1
sSQL = sSQL & " WHERE ID= " & txt2

Similarly I have lot of Textbox and combo box

I don't want to create
if textbox1.value < "" then perform this operation
elseif do something
elseif do more....
end if

Please help in providing single sql statement which solve all the
queries.

Thanks in advance.


All times are GMT +1. The time now is 10:45 PM.

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