I am using vba code behind a button that is supposed to move data entered into my form into a table.
I am trying to use the same code that I have used in my other forms, but this time I have a list box included in the form and the code is throwing an error at me when it gets to that part.
Are list boxes handled differently in VBA?
Here is my code:
Private Sub cmdAdd_Click()
Dim strSql As String
strSql = "INSERT INTO Activities (ActTypeID, ActDesc, StoID, ToID) VALUES (" & Me.lsttype & ", " & Me.txtdesc & ", " & Me.cmbSTO & ", " & Me.cmbTO & "')"
CurrentDb.Execute strSql, dbFailOnError
The error message is: "Compile Error: Method or data member not found"