Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms Programming / April 2005

Tip: Looking for answers? Try searching our database.

change value in a seperate table

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Russ - 21 Apr 2005 18:24 GMT
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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.