I have table in sql. So how do i edit when button is clicked in vba user form.
(2 textbox(userid and password) and a combo box which contains value .
Sql table should be edit when i enter value from vba.
(Connection to sql is done) but when i write sql code in vba, i get a error saying user pass is invalid or unrefined.
My code goes like this
Dim pass as string
Dim id as string
Dim cb as string
Pass=txtb1.textbox
Id= txtb2. Textbox
Cb=combobox.value
Conn.open(Connection code)
Set rs=conn.Execute("update mlogin set loginid='"&id&"'loginpass='"pass&"'where loginvalue="&cb)
Conn.close
Set conn=nothing
Thank you inadvance
(2 textbox(userid and password) and a combo box which contains value .
Sql table should be edit when i enter value from vba.
(Connection to sql is done) but when i write sql code in vba, i get a error saying user pass is invalid or unrefined.
My code goes like this
Dim pass as string
Dim id as string
Dim cb as string
Pass=txtb1.textbox
Id= txtb2. Textbox
Cb=combobox.value
Conn.open(Connection code)
Set rs=conn.Execute("update mlogin set loginid='"&id&"'loginpass='"pass&"'where loginvalue="&cb)
Conn.close
Set conn=nothing
Thank you inadvance