Updating Database Problem

onkeypress

New member
Local time
Today, 12:57
Joined
Oct 6, 2006
Messages
7
I have a few textboxes that updates on the event AfterUpdate

When I was using the MDB on the development PC (Office 2002) everything was OK.
But when I copied and transferred the files to another PC (Office 2002 too), every time I update the value of textbox, Access will pop up a confirmation box " You are about to update 1(rows). Once you click YES, you cannot use the Undo Command to reverse the changes. Are you sure you want to update the changes? "

[Yes] [No]

Here is my coding of one of the textboxes.

Private Sub txtUnit_AfterUpdate()
Dim strsql As String
strsql = "update user set unit='" & [txtUnit] & "' where flagupdate ='1'"
DoCmd.RunSQL strsql
End Sub


Do I have to configure anything so that I can skipped the confirmation dialog box and just update the record? It kinda annoys my users...
Thanks.
 
Have you tried placing "DoCmd.SetWarnings"? I have turned them off at the beginning of the code "DoCmd.SetWarnings False" and then turned them back on after event was complete so that they were not left on "DoCmd.SetWarnings True"
 
If you use strSQL.Execute in stead of DoCmd.RunSQL strsql you don't have to disable/enable the warnings.
 
theres a setting in tools/options/edit find (access 97) which confirms actions. i normally set these off, and set them on as i need them. are they on in the target computer?
 

Users who are viewing this thread

Back
Top Bottom