I am using Pendragon Forms to put my access database on the palm, this
program uses a timestamp to limit hte record on the palm to the last 28 days.
I need a code to chagne the timestamp to the current date and time in
several tables which have the patient i want on the palm. the button to run
the command is in a form called "Patient Chart" and i would like it to query
several tables and if the patient is present in the table to change the
timestamp.
i tried : If DCount("[SSN]", "Demographics", "[SSN] ='" & Me.SSN & "'") > 0
Then
[demographics].[SSN] = Date
End If
but this did not work. any help would be appreciated.
russ

Signature
Russ
George Nicholson - 21 Apr 2005 22:06 GMT
I would think you need something more like:
strSQL = "UPDATE Demographics SET [SSN] = Date() WHERE [SSN] ='" &
Me.SSN & "'"
and then either
DoCmd.RunSQL strSQL
or
CurrentDB.Execute strSQL, dbFailOnError
HTH,

Signature
George Nicholson
Remove 'Junk' from return address.
>I am using Pendragon Forms to put my access database on the palm, this
> program uses a timestamp to limit hte record on the palm to the last 28
[quoted text clipped - 16 lines]
>
> russ
John Nurick - 21 Apr 2005 22:48 GMT
Hi Russ,
It's usually simpler to build and execute SQL update queries as
required, e.g. this (XXX is the name of the timestamp field)
Dim strSQL
strSQL = "UPDATE Demographics SET XXX = Now()" _
& " WHERE SSN = '" & Me.SSN.Value & "';"
CurrentDB.Execute strSQL
>I am using Pendragon Forms to put my access database on the palm, this
>program uses a timestamp to limit hte record on the palm to the last 28 days.
[quoted text clipped - 12 lines]
>
>russ
--
John Nurick [Microsoft Access MVP]
Please respond in the newgroup and not by email.