hi,
I need to update data in a field of a access table one by one. or 70% of the table filds I need to fill with one value.
below code update entire table. please help. thank you!
regards,
jagu
I need to update data in a field of a access table one by one. or 70% of the table filds I need to fill with one value.
below code update entire table. please help. thank you!
Code:
dimsa = "Tbl_Production"
strAreaType2 = Form_Assign.txt_activity.Value
cntid = Form_Assign.Combo237.Value
strSQLCheckUserExists = "Select * FROM " & dimsa & " where Activity_Name ='" & strAreaType2 & "' and Processor='" & cntid & "'"
Recsetwatt.Open strSQLCheckUserExists, conwatt, adOpenDynamic, adLockOptimistic
s = Form_Assign.Text242.Value
w = Form_Assign.Text95.Value
pvalue = s * 70
pvaluep = pvalue / 100
i = 0
For i = 1 To pvaluep
With Recsetwatt
conwatt.Execute "Update " & dimsa & " set Userid_s= '" & Form_Assign.Combo234.Value & "' where Activity_Name ='" & strAreaType2 & "' and Processor='" & cntid & "'"
End With
i = i + 1
Next
regards,
jagu
Last edited by a moderator: