Search results

  1. L

    Syntax error with INSERT INTO

    Hey Paulo, watch that Chianti! Basically I'm trying to build a second table with two fields (id, category) the id direct from the first table and a derived value 'category' based on the combination of two values (posn and level) in the first table. Caprice? Gracie
  2. L

    Syntax error with INSERT INTO

    Gracie, a few questions Where do you put the destination field? This is table2.category Note you've used the query syntax for 'If' (IIf), I thought vba required 'if, else' type code Are you able to give an alternative based on a case statement rather than ifs Cheers, Luigi
  3. L

    Syntax error with INSERT INTO

    How does this look? 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 Then table2.Category = "Heavy" Else...
  4. L

    Syntax error with INSERT INTO

    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...
Back
Top Bottom