time stamp update to table  using  variable for date/time review

Fordraiders
Fordraiders used Ask the Experts™
on
time stamp in table  using sql  review
dim dCurr as date
dCurr =  now()

ttt =  me.txtOpened.value

 If Forms!nsc_dataentry.txtReOpened.Value <> "" Then
                    strsql_sql = "INSERT INTO [dbo_t_nsc_trackcode_trans_time_entry](NSC_ID_Ref, [opened_at], InProgress_or_Closed_at)" & vbCrLf
                    strsql_sql = strsql_sql & "VALUES (" & Me.NSC_Id & ",'" & ttt & "' , '" & dCurr & "');"
                    CurrentDb.Execute strsql_sql, dbSeeChanges


Does anyone see why this would not time stamp correctly  in the "VALUES" part of the statement ?
a better way to use the variable   dCurr ?
Thanks
fordraiders
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Owner, Dev-Soln LLC
Most Valuable Expert 2014
Top Expert 2010
Commented:
Try:

If Forms!nsc_dataentry.txtReOpened.Value <> "" Then
    strsql_sql = "INSERT INTO [dbo_t_nsc_trackcode_trans_time_entry] (NSC_ID_Ref, [opened_at], InProgress_or_Closed_at) " _
               & "VALUES (" & Me.NSC_Id & ",'" & ttt & "' , #" & dCurr & "#)"
    debug.print strsql_sql
    CurrentDb.Execute strsql_sql, dbSeeChanges

Open in new window

Author

Commented:
Thanks Dale

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial