Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

updating a value on a table from a field 1

Status
Not open for further replies.

wshs

Programmer
Nov 22, 2005
220
US
CurrentProject.Connection.Execute _
"Update tbl_fsource " & "SET Contp =" & Me.txtContAmt & " Where BFSIX='" & Me.LstBud.Column(7) & "'"

this code currently replaces the field on the table..
but i need to add that amount to make new balance.

i've tried doing

CurrentProject.Connection.Execute _
"Update tbl_fsource " & "SET Contp =" & contp + Me.txtContAmt & " Where BFSIX='" & Me.LstBud.Column(7) & "'"

but it didnt do anything different. Is it possible to add that "txtContAmt" to Contp instead of replacing it?
 
how about this?

CurrentProject.Connection.Execute _
"Update tbl_fsource " & "SET Contp = Contp + " & Me.txtContAmt & " Where BFSIX='" & Me.LstBud.Column(7) & "'"

-Pete
 
that works! thank you pete!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top