quick update questions (1 Viewer)

swarv

Registered User.
Local time
Today, 12:24
Joined
Dec 2, 2008
Messages
196
Hi all,

Is there any reason why this wont work?

Code:
    Dim SQL As String
    Dim IDhere As String
IDhere = idh
    SQL = "UPDATE Main SET Main.Out = 0 WHERE Main.ID = 'IDhere'"
    DoCmd.RunSQL SQL
DoCmd.Close acForm, "Loggedout"

idh is a text box on the form that is linked to the ID field of the table.
Main is the table
Out is a field name

All I want to do on the form is click a button and it changes 1 field on the relavent record.

Many thanks

Martin
 

swarv

Registered User.
Local time
Today, 12:24
Joined
Dec 2, 2008
Messages
196
excellent cheers, was only a " mark out of place.
 

Users who are viewing this thread

Top Bottom