Luigi_Cortisone
Registered User.
- Local time
- Tomorrow, 09:53
- Joined
- Dec 10, 2008
- Messages
- 24
HI there
Can someone help with my syntax error. There seems to be a problem on the 'INSERT INTO...' line
I'm going to build quite a complex series of nested if statements here. Would I be better with a CASE statement? Can someone direct me to some good examples that would work in this situation
Thanks, Luigi
Sub Build_Table2() DoCmd.RunSQL "DROP TABLE table2;"DoCmd.RunSQL "CREATE TABLE table2([id] integer, [category] TEXT(80));"DoCmd.RunSQL "INSERT INTO table2 SELECT table1.id, &_" If table1.posn = "OH" And table1.level = 2 Thentable2.Category = "Heavy"Elsetable2.Category = "Light"End If End Sub
Can someone help with my syntax error. There seems to be a problem on the 'INSERT INTO...' line
I'm going to build quite a complex series of nested if statements here. Would I be better with a CASE statement? Can someone direct me to some good examples that would work in this situation
Thanks, Luigi
Sub Build_Table2() DoCmd.RunSQL "DROP TABLE table2;"DoCmd.RunSQL "CREATE TABLE table2([id] integer, [category] TEXT(80));"DoCmd.RunSQL "INSERT INTO table2 SELECT table1.id, &_" If table1.posn = "OH" And table1.level = 2 Thentable2.Category = "Heavy"Elsetable2.Category = "Light"End If End Sub