NigelRocks
asked on
What's Wrong with this Code?
Experts,
In the attached code, I'm passing in a form object and then building a SQL string based on controls on that form. The line with "VALUES" in it tells me that the object "won't support this property or method". What am I missing?
In the attached code, I'm passing in a form object and then building a SQL string based on controls on that form. The line with "VALUES" in it tells me that the object "won't support this property or method". What am I missing?
Public Function nInsertTaskFromForm(taskForm As Form)
'bc1
If taskForm.Name <> "frmTask" Then
nInsertTaskFromForm = -1
Exit Function
End If
' insert record into TASKS table
sSQL = "INSERT INTO Tasks "
sSQL = sSQL + "(taskForm.Tasks_Description"
sSQL = sSQL & ",taskForm.Tasks_Short_Desc"
sSQL = sSQL & ",taskForm.Tasks_Start_Date"
sSQL = sSQL & ",taskForm.Status) "
sSQL = sSQL & "VALUES('" & taskForm.txtTaskDesc.Text & "'"
sSQL = sSQL & ",'" & taskForm.txtTaskShortDesc.Text & "'"
sSQL = sSQL & ",#" & taskForm.txtStartDate & "#"
sSQL = sSQL & "," & CStr(geWorkStatus.Due) & ")"
gdbKnowledgeTracker.Execute sSQL
nNewTaskID = nGetMaxRecordIDFromTable(gdbKnowledgeTracker, "Tasks", "Task_ID")
End Function
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.