Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help with SQL Statement

2 views
Skip to first unread message

magmike

unread,
Dec 17, 2016, 5:07:41 PM12/17/16
to
I need help with the following code in the Double Click event of a form field (Account). Double clicking results in the error,

"Run-time error '2465': Application-Defined or object-defined error"

I can't figure out what I have done wrong. "78" is the ID number of the StatusCode for "CUST"

Here is the code,

Private Sub ACCOUNT_DblClick(Cancel As Integer)
Dim stSQL As String

stSQL = "INSERT into Status (StatusCompany, StatusCode, StatusNotes) " & _
"Values (" & Forms!ProspectForm.ProspectID & ", " & "78" & ", " & [ACCOUNT] & ")"
End Sub

Thanks in advance for your help,

magmike
0 new messages