A
Anthony
Hi,
My VBA knowledge is quite limited
I have a function:
-----
Function Update2ndYrDate(txtcustid As String, dteDue As Date)
Dim SQL As String
If MsgBox("Is this client entering the 2nd year of the contract?", vbYesNo)
= vbYes Then
SQL = "UPDATE tblcustomer SET tblcustomer.dte2ndYearStart = #" & dteDue
& "# WHERE (((tblcustomer.CustomerID)=" & txtcustid & "));"
DoCmd.RunSQL SQL
End If
End Function
-----
When I Type the following:
Update2ndYrDate (Me.CustomerID,me.DatePaymentDue )
I get a error "Expected: ="
Could anybody give me some advice on this one.
I can't work out what I am doing wrong.
Thanks in advance.
Anthony
My VBA knowledge is quite limited
I have a function:
-----
Function Update2ndYrDate(txtcustid As String, dteDue As Date)
Dim SQL As String
If MsgBox("Is this client entering the 2nd year of the contract?", vbYesNo)
= vbYes Then
SQL = "UPDATE tblcustomer SET tblcustomer.dte2ndYearStart = #" & dteDue
& "# WHERE (((tblcustomer.CustomerID)=" & txtcustid & "));"
DoCmd.RunSQL SQL
End If
End Function
-----
When I Type the following:
Update2ndYrDate (Me.CustomerID,me.DatePaymentDue )
I get a error "Expected: ="
Could anybody give me some advice on this one.
I can't work out what I am doing wrong.
Thanks in advance.
Anthony