I use the following code to save a record into another table called "test" :
Function BeforeAdd(dict)
' Parameters:
' dict - Scripting.Dictionary object.
' Each field on the Add form represented as 'Field name'-'Field value' pair
'** Save new data in another table ****
strSQLSave = "insert into test (H_Kategorie_AOA, H_Klasse_AOA) values ("
strSQLSave = strSQLSave & dict(H_Kategorie_AOA) & ","
strSQLSave = strSQLSave & dict(H_Klasse_AOA)
strSQLSave = strSQLSave & ")"
dbConnection.Execute strSQLSave
BeforeAdd = True
' set BeforeAdd to True if you like to proceed with adding new record
' set it to False in other case
End Function
PROBLEM: I get this syntax error:
ASP ... Fehler ist aufgetreten
Technische Information
Error number -2147217900
Fehlerbeschreibung [Microsoft][ODBC Microsoft Access Driver] Syntaxfehler in der INSERT INTO-Anweisung.
Any idea what is wrong?
Regards,
Philip