cken21
Technical User
- Oct 19, 2011
- 37
Hi,
I have been searching forums and google all week to try and crack this, and i think i am most of the way there. I have an excel userform which currently collects data through Textboxes, Combo boxes, Checkboxes etc. What i need to do is pull this information off the database and display it on my userform - This part i have cracked with the following code:
Search = tbSearch.Value
Set rs = New ADODB.Recordset
searchstring = "SELECT ProductNum, Brand, FeedbackFrom FROM SwitchingFeedbackLog WHERE [ProductNum] = '" & Search & "'"
rs.Open searchstring, cn, adOpenStatic
tb1.Text = rs.Fields("ProductNum") 'or whatever
tb2.Text = rs.Fields("Brand") 'or whatever
tb3.Text = rs.Fields("FeedbackFrom") 'or whatever
Set rs = Nothing
However i am lost on how to edit this record once displayed, and if possible delete it. Any help or tips would be greatly appreciated.
I have been searching forums and google all week to try and crack this, and i think i am most of the way there. I have an excel userform which currently collects data through Textboxes, Combo boxes, Checkboxes etc. What i need to do is pull this information off the database and display it on my userform - This part i have cracked with the following code:
Search = tbSearch.Value
Set rs = New ADODB.Recordset
searchstring = "SELECT ProductNum, Brand, FeedbackFrom FROM SwitchingFeedbackLog WHERE [ProductNum] = '" & Search & "'"
rs.Open searchstring, cn, adOpenStatic
tb1.Text = rs.Fields("ProductNum") 'or whatever
tb2.Text = rs.Fields("Brand") 'or whatever
tb3.Text = rs.Fields("FeedbackFrom") 'or whatever
Set rs = Nothing
However i am lost on how to edit this record once displayed, and if possible delete it. Any help or tips would be greatly appreciated.