The quickest and easiest way to find a record and replace or update a value is to use an UPDATE query. From VBA you can use the RunSQL method of DoCmd to execute a query.
Example: Update a column in a table to a value in a text box on the form based on the criteria in another text box.
Dim StrSQL As String
strSQL="UPDATE MyTable SET col1='" & txtNewValue & "'"
strSQL=strSQL & " WHERE keycol=" & Me.txtCriteria
DoCmd.RunSQL strSQL Terry L. Broadbent Life would be easier if I had the source code. -Anonymous
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.