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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Updating a Table

Status
Not open for further replies.

ssMaj

Programmer
Joined
Feb 7, 2007
Messages
6
Location
US
I have a table with a field called "Stat" with a numeric value. Then on a form i have a Command Button. What i would like to do is every time the Button is clicked, is to add 1 to that "Stat" value. Not sure how i would do that..???
 

Perhaps an update query in the button On_Click event?


Randy
 
1. This is the SQL forum.
2. Why would you wish to do that?
 
I'm doing an UPDATE statement, but the WHERE clause is not working... I want it to UPDATE ASSOC_ID where ASSOC_ID = cboAssociate.value....but it doesnt like that
 

If you post the SQL, we might be able to see what's wrong with your query/code.


Randy
 
Thank you to Everybody that Replied. I figured it out...I had to make the where clause like this..

"UPDATE.....WHERE DEPEND_ID = '" & cboDependent2.Value & "';"


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top