Don wrote:
[Quoted Text] > I want to change the format of some code in a timer form that records > the date in a table to tell if the code was sucessfully run. What I > would like to do is change that code to include the time in the same > field as the date if possible as well. The following is the code that > includes only the date: > > strSQL = "UPDATE tblTimerDate SET LastTimerDate = " & _ > ' Format(Date, "\#mm/dd/yyyy\#") > > On Error GoTo Err_Handler > > If Time() > #5:10:00 AM# Then > > If DLookup("LastTimerDate", "tblTimerDate") < Date Then > > If DLookup("LastTimerDate", "tblTimerDate") < Date Then > > Set dbs = CurrentDb > Set wrk = DAO.DBEngine.Workspaces(0) > > ' begin transaction > wrk.BeginTrans > > ****Several Code query instructions here then***** > > ' Update tblTimerDate table > strQuery = "embedded SQL to update tblTimerDate" > dbs.Execute strSQL, dbFailOnError
Formatting means diddly squat. DateTimes are always STORED exactly the same. If your "embedded SQL that you didn't share with us" includes a non-midnight time component then it will be stored in the table along with the date.
-- Rick Brandt, Microsoft Access MVP Email (as appropriate) to... RBrandt at Hunter dot com
|