As far as CRs (etc) go, I totally agree with you. I was using those character codes back in Access 2.0 where I don't think (but I could be wrong) there was a vbCr, etc.
As far as quotes go, I guess it is just what I am used to but these two lines produce the same results:
I don't know if this the amateur way of doing it or not (or maybe just the lazy way), but I like to deal with quotes like this:
Code:
Dim strCriteria As String
Dim ChrQuote As String
ChrQuote = Chr(34) ' Chr(34) is the character code for a quote sign
strCriteria = "[field1] = " & ChrQuote & strVariable & ChrQuote
DLookup("field2", "table1", strCriteria)
Leave a comment: