Hi,
I use the query tool to create SQL strings that I then add in a VBA module.
I've created the one below, and I get different errors. Does anyone see some odd things? I've tried out different soultions now for an hour....
The mistake is somewhere in the two last lines, that for sure
strMsg = "Anbud nr: " & ChoosedOffer & " är noterat"
db.Execute "UPDATE (tblAM INNER JOIN tblAnb ON tblAM.AMID = tblAnb.AMID)" _
& " INNER JOIN tblAnb_Uppf ON tblAnb.AnbID = tblAnb_Uppf.AnbID" _
& " SET tblAnb_Uppf.UppfDatum = Date(), tblAnb_Uppf.Kommentar = strMsg" _
& " WHERE (((tblAnb.AMID)=" & BOpp & ") AND ((tblAnb_Uppf.AnbID)<>" & ChOff & ") AND ((tblAnb_Uppf.NyttUppfDatum)<>0))"
BOpp and HhOff are constants that have correct values - I've checked when I debuged
I guess I'm missing some odd sign...
Thanks in advance!
I use the query tool to create SQL strings that I then add in a VBA module.
I've created the one below, and I get different errors. Does anyone see some odd things? I've tried out different soultions now for an hour....
The mistake is somewhere in the two last lines, that for sure
strMsg = "Anbud nr: " & ChoosedOffer & " är noterat"
db.Execute "UPDATE (tblAM INNER JOIN tblAnb ON tblAM.AMID = tblAnb.AMID)" _
& " INNER JOIN tblAnb_Uppf ON tblAnb.AnbID = tblAnb_Uppf.AnbID" _
& " SET tblAnb_Uppf.UppfDatum = Date(), tblAnb_Uppf.Kommentar = strMsg" _
& " WHERE (((tblAnb.AMID)=" & BOpp & ") AND ((tblAnb_Uppf.AnbID)<>" & ChOff & ") AND ((tblAnb_Uppf.NyttUppfDatum)<>0))"
BOpp and HhOff are constants that have correct values - I've checked when I debuged
I guess I'm missing some odd sign...
Thanks in advance!