B
Billp
Just when things seemed to be going well and then a corrupt form which had to
be rebuilt along with the VBA behind it I get.
An error 3137 - missing semi colon
strsql = "INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) " _
& " VALUES (""" & strFirst & """, """ & strLast &
""")" _
& " WHERE [CustID] = " & Me![CustID]
Immediate Print out of
INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) VALUES
("Fergie", "Fred") WHERE [CustID] = 1391
Even if I Have
strsql = "INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) " _
& " VALUES (""" & strFirst & """, """ & strLast &
""")" _
& " WHERE [CustID] = '" & Me![CustID] & "';"
Print out
INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) VALUES
("Fergie", "Fred") WHERE [CustID] = 1391INSERT INTO [tblCUSTCONTACTS] (
[FIRST_NAME], [LAST_NAME] ) VALUES ("Fergie", "Fred") WHERE [CustID] =
'1391';
I get the same error.
I cannot use an update query as I am appending (so I believe that limits me
to an INSERT INTO) a new lot of data to a table where.
Assistance apprecaited - I read Allen Brownes esay on Quotation marks in
statements - still blind.
Cheers and best wishes
be rebuilt along with the VBA behind it I get.
An error 3137 - missing semi colon
strsql = "INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) " _
& " VALUES (""" & strFirst & """, """ & strLast &
""")" _
& " WHERE [CustID] = " & Me![CustID]
Immediate Print out of
INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) VALUES
("Fergie", "Fred") WHERE [CustID] = 1391
Even if I Have
strsql = "INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) " _
& " VALUES (""" & strFirst & """, """ & strLast &
""")" _
& " WHERE [CustID] = '" & Me![CustID] & "';"
Print out
INSERT INTO [tblCUSTCONTACTS] ( [FIRST_NAME], [LAST_NAME] ) VALUES
("Fergie", "Fred") WHERE [CustID] = 1391INSERT INTO [tblCUSTCONTACTS] (
[FIRST_NAME], [LAST_NAME] ) VALUES ("Fergie", "Fred") WHERE [CustID] =
'1391';
I get the same error.
I cannot use an update query as I am appending (so I believe that limits me
to an INSERT INTO) a new lot of data to a table where.
Assistance apprecaited - I read Allen Brownes esay on Quotation marks in
statements - still blind.
Cheers and best wishes