Karen Schaefer
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
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
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help.
ASKER