User Profile

Collapse

Profile Sidebar

Collapse
HankWalters
HankWalters
Last Activity: Feb 16 '11, 02:57 PM
Joined: Jun 2 '09
Location: Fernandina Beach, FL
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • HankWalters
    replied to Force .DefaultValue to be a string
    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:
    Code:
    strCriteria = "[field1] = """ & variable & """"
    strCriteria = "[field1] = " & ChrQuote
    ...
    See more | Go to post

    Leave a comment:


  • HankWalters
    replied to Force .DefaultValue to be a string
    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)
    ...
    See more | Go to post

    Leave a comment:


  • HankWalters
    replied to SQL - Simple query
    You could also set a variable to the character code for the quote sign and concatenate it to your string. Something like this:

    Code:
    ChrQuote = Chr(34)
    strPitch = "0.050" & ChrQuote
    string strSQL = "SELECT * FROM View_BoardToBoard WHERE Pitch LIKE '" & strPitch & "'";
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...