When using currentdb.execute, I'm getting the error: too few parameters expected 1
1st table, tbl_contract
2 fields: ContractID (number, long)
StartDate (date, short)
2nd table: tbl_Customer
2 fields: CustomerID (number, long)
RequestDate (date, short)
Have form: frm_Mainform (for tbl_Contract)
Have a date field on form: StartDate
When an user enters a StartDate I need to UPDATE the RequestDate field in tbl_Customer
'===========
Dim dtSTARTDATE as date
dim strSTARTDATE as string
dim NumID as long
dim strSQL as string
dtSTARTDATE = forms!frm_Mainform[STARTDATE]
strSTARTDATE = dtSTARTDATE
NumID = Me.ContractID
strSQL = "UPDATE tbl_customer set tbl_customer.[RequestDate] = ('" & strSTARTDATE & "') where tbl_customer.[CustomerID] = NumID";
Currentdb.Execute strSQL
' ====================
I also tried putting using the 'date' in the strSQL with no luck
strSQL = "UPDATE tbl_customer set tbl_customer.[RequestDate] = #" & dtSTARTDATE & "# where tbl_customer.[CustomerID] = NumID";
Your help would be greatly appreciated!