Link to home
Start Free TrialLog in
Avatar of Karen Schaefer
Karen SchaeferFlag for United States of America

asked on

Add date to update field

I am using a passthru query to update a local Access table, I need to include date modified.

What is the proper syntax to pass the date?

Karen
Set adoConn = New ADODB.Connection
    adoConn.Open sConn
    Set adoRS = New ADODB.Recordset
        CurrentDb.Execute "Delete * from tblFTCS_vw"
        Set rs = New ADODB.Recordset
        strSQL = "Select * from tblFTCS_VW"
        rs.Open strSQL, cn, adOpenDynamic, adLockOptimistic
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>        
        strSQL = "SELECT FTEM_ID, EQPT_NAME, NOMEN_MODIFIER_NAME, SERVICE_ORGN_CODE as LabNo, MFR_NAME, MFR_NO, Date()" & _
                " FROM FTCSPROD.FTEM_VI_VW" & _
                " Where (SERVICE_ORGN_CODE Is Not Null)"
'>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
        adoRS.Open strSQL, adoConn, adOpenStatic, adLockPessimistic
        'Recreates the temp table with FTCS data.
     
        Do Until adoRS.EOF
            rs.AddNew
                For j = 0 To adoRS.Fields.Count - 1
                    rs(j) = Nz(adoRS(j))
                Next j
            rs.Update
            adoRS.MoveNext
        Loop

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Karen Schaefer

ASKER

thanks that did the trick.
Avatar of slightwv (䄆 Netminder)
slightwv (䄆 Netminder)

Glad to help.