Emergency
Oct 5, 2005hi all......i really need your help.
i have a db inaccess 97, which was working by last friday properly.
it has 3 main forms:
1- add tasks
2- update tasks
3- close tasks
the first 2 forms work ok, however, the form 3 doesnt.
Before closing the form 3, it saves the values updated in 2 tables, the main table (newchanges, updating values) and in the history table (history, inserting records). when i press the save button, the sql to insert records in the history table works perfectly, but the update statement doesnt work.
any idea? all the values are ok.. thx 4 your help
Public Sub grabarstatus()
DoCmd.SetWarnings False
DoCmd.RunSQL "insert into [history] (change_id,before,after,user,modify,action) values (" & Me.Task_Num.Value & ",'" & vstatus & "','" & Me.status.Value & "','" & Forms!Login!username1 & "','" & Now() & "','Validate status');"
DoCmd.RunSQL "update [newchange] set status='" & Me.status.Value & "' where change_id=" & Me.Task_Num.Value & ";"
DoCmd.SetWarnings True
End Sub