Quick help please - searched no RESULTS.

BLeslie88

B Leslie
Local time
Today, 02:04
Joined
May 9, 2002
Messages
228
Doing an update query - and...

when user enter "it's"

the '

Because it crashed - I will do a few tests such as change string to text...

Any tips clues appreciated.

DoCmd.RunSQL ("UPDATE tblAddress INNER JOIN tblInventory ON tblAddress.CUSTNO = tblInventory.CustNo SET tblAddress.FAXDESCFR = '" & Str2 & _
"', tblAddress.FAXDESCGR = '" & Str1 & "' where tblInventory.CreditRep = '" & Str3 & "' and tblAddress.LANG = 'French';")
 
Last edited:
Code that fixed it - found in the help -

DoCmd.RunSQL ("UPDATE tblAddress INNER JOIN tblInventory ON tblAddress.CUSTNO = tblInventory.CustNo SET tblAddress.FAXDESCFR = """ & Combo13.Value & _
""", tblAddress.FAXDESCGR = """ & Combo19.Value & """ where tblInventory.CreditRep = """ & Str3 & """ and tblAddress.LANG = 'French';")


Replaced '"with """
 
You could also have used

Chr(34)

in place of the triple quotes.

So

DoCmd.RunSQL ("UPDATE tblAddress INNER JOIN tblInventory ON tblAddress.CUSTNO = tblInventory.CustNo SET tblAddress.FAXDESCFR = " & Chr(34) & Combo13.Value & _
Chr(34) & ", tblAddress.FAXDESCGR = " & Chr(34) & Combo19.Value & Chr(34) & " where tblInventory.CreditRep = " & Chr(34) & Str3 & Chr(34) & " and tblAddress.LANG = 'French';")
 

Users who are viewing this thread

Back
Top Bottom