Stop me flicking (1 Viewer)

aingram

Registered User.
Local time
Today, 03:06
Joined
Jun 20, 2005
Messages
29
I have an update query that looks for a name eg "first"
then it is suppost to update a field with 1

I have a command button that runs the query

This then says "you are about to update 1 row(s) so i press yes, but the field doesn't update

But if i flick through the database and then come back to the record it has updated

How can i do this so i dont have to flick

Thanks
Andrew
 

FoFa

Registered User.
Local time
Yesterday, 21:06
Joined
Jan 29, 2003
Messages
3,672
It is updated, you just can't see the update until you refresh the screen which you are doing in a round about way by "flicking" through the data.
requery your form or whatever after the update query runs.
 

godofhell

Database Guru
Local time
Yesterday, 19:06
Joined
May 20, 2005
Messages
180
If you find the "You are about to update..." message annoying shut off the system warnings while you execute the code.

Sub Runquery cmdbutton_onClick()
DoCmd.SetWarnings False
Docmd.Runquery "YourQueryName"
myform.Requery
'If the Requery does not work try this:
Docmd.RunCommand accmdRefresh

End Sub
 

Users who are viewing this thread

Top Bottom