B
Bernd
Hi,
I use the following sql instruction in my database:
strSQL = "Insert Into tblProducts ([Date]) values ('" &
NewData & "')"
and now I want to add a 'WHERE clause', but everytime I
tryed to write the following instruction:
strSQL = "Insert Into tblProducts ([Date]) values ('" &
NewData & "') Where tblProducts.PatientNameID = forms!
MainForm!Combo0;"
The compiler gives me the following error message:
'Missing semicolon ( at end of SQL statement'
But I just wrote the semicolon ( at the end of the
instruction.
The following istructions in my code are the following,
but I don't think that they need ';' at the end:
If i = vbYes Then
strSQL = "Insert Into tblProducts ([Date]) values
('" & NewData & "') Where
tblProducts.PatientNameID = forms!MainForm!combo0;"
CurrentDb.Execute strSQL, dbFailOnError
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Clear is that I wrote the above SQL instruction on the
same line.
How is the exact code for this SQL instruction?
Thanks
Bernd
I use the following sql instruction in my database:
strSQL = "Insert Into tblProducts ([Date]) values ('" &
NewData & "')"
and now I want to add a 'WHERE clause', but everytime I
tryed to write the following instruction:
strSQL = "Insert Into tblProducts ([Date]) values ('" &
NewData & "') Where tblProducts.PatientNameID = forms!
MainForm!Combo0;"
The compiler gives me the following error message:
'Missing semicolon ( at end of SQL statement'
But I just wrote the semicolon ( at the end of the
instruction.
The following istructions in my code are the following,
but I don't think that they need ';' at the end:
If i = vbYes Then
strSQL = "Insert Into tblProducts ([Date]) values
('" & NewData & "') Where
tblProducts.PatientNameID = forms!MainForm!combo0;"
CurrentDb.Execute strSQL, dbFailOnError
Response = acDataErrAdded
Else
Response = acDataErrContinue
End If
Clear is that I wrote the above SQL instruction on the
same line.
How is the exact code for this SQL instruction?
Thanks
Bernd