emergency

adaniele

Registered User.
Local time
Today, 22:15
Joined
Jul 18, 2005
Messages
176
hi 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

Code:
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
 
Verify your values and run the query externally (as a wuery) to see what is going on.
 
it happens that when nobody is logged in , i can close a task. but if somebody else is using the db i cant, the form doesnt update that table.
thx
 
Check to see what yours/theirs record locking is set to.
 

Users who are viewing this thread

Back
Top Bottom