violentjay25
Registered User.
- Local time
- Today, 17:11
- Joined
- Feb 22, 2005
- Messages
- 30
This code works just fine
DoCmd.RunSQL "Insert into tbl_Updates (Date1, Memo1, ProjectName) " & _
"Values (#" & Me.txtDate1 & "#, """ & _
Me.txtMemo1 & """, '" & _
Me.cboProjectName & "')"
But when I want to use this same code and add another field as below. It gives me a syntax error. There seems to be an issue when I add a new field to this code. Please help.
DoCmd.RunSQL "Insert into tbl_Updates (Date1, Memo1, NewField, ProjectName) " & _
"Values (#" & Me.txtDate1 & "#, """ & _
Me.txtMemo1 & """, '" & _
Me.txtNewField & """, '" & _
Me.cboProjectName & "')"
DoCmd.RunSQL "Insert into tbl_Updates (Date1, Memo1, ProjectName) " & _
"Values (#" & Me.txtDate1 & "#, """ & _
Me.txtMemo1 & """, '" & _
Me.cboProjectName & "')"
But when I want to use this same code and add another field as below. It gives me a syntax error. There seems to be an issue when I add a new field to this code. Please help.
DoCmd.RunSQL "Insert into tbl_Updates (Date1, Memo1, NewField, ProjectName) " & _
"Values (#" & Me.txtDate1 & "#, """ & _
Me.txtMemo1 & """, '" & _
Me.txtNewField & """, '" & _
Me.cboProjectName & "')"