P
PC User
I'm trying to execute an append query (qapdCopy&PasteProperties) with
visual basic, but I get an error.
Run-time error ''
Syntex error in INSERT INTO statement.
================================================
Private Function Duplicate()
Dim strInsert As String, strFrom As String
Dim sstrWhere As String, Dim strSQL As String
Dim db As DAO.Database
Set db = CurrentDb
strInsert = "INSERT qapdCopy&PasteProperties.* "
strFrom = "FROM qapdCopy&PasteProperties "
strWhere = "WHERE qapdCopy&PasteProperties.ChemicalID = " & [Forms]!
[frmMain]![ctlGenericSubform].[Form]![ChemicalID]
strSQL = strInsert & strFrom & strWhere
db.Execute strSQL, dbFailOnError
End Function
================================================
I'm not familiar with putting an append query into visual basic. Can
someone help?
Thanks,
PC
visual basic, but I get an error.
Run-time error ''
Syntex error in INSERT INTO statement.
================================================
Private Function Duplicate()
Dim strInsert As String, strFrom As String
Dim sstrWhere As String, Dim strSQL As String
Dim db As DAO.Database
Set db = CurrentDb
strInsert = "INSERT qapdCopy&PasteProperties.* "
strFrom = "FROM qapdCopy&PasteProperties "
strWhere = "WHERE qapdCopy&PasteProperties.ChemicalID = " & [Forms]!
[frmMain]![ctlGenericSubform].[Form]![ChemicalID]
strSQL = strInsert & strFrom & strWhere
db.Execute strSQL, dbFailOnError
End Function
================================================
I'm not familiar with putting an append query into visual basic. Can
someone help?
Thanks,
PC