Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Find asterisk (2000/XP)

    I have some text (in multiple fields) that contains a leading asterisk( *).
    I'm trying to write a function I can use in an update query.

    How do I check for the asterisk rather than vba assuming I'm using it as a wild card.

    The data (which is messy) was imported as fixed width, with all fields as text (due to characters such as * and 3 dashes to indicate no data).

    This means I have lots of spaces I need to trim off. Before I can us trim I need to get rid of the *'s

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Find asterisk (2000/XP)

    To search for an asterisk as a character, use[*] in the Find what box. Similarly, to search for a question mark, use [?]

  3. #3
    Gold Lounger
    Join Date
    Jun 2001
    Location
    Crystal Beach, FL, Florida, USA
    Posts
    3,436
    Thanks
    1
    Thanked 34 Times in 34 Posts

    Re: Find asterisk (2000/XP)

    You can use the InStr() function to look for the character. A value >0 indicates it is in string.
    Mark Liquorman
    See my website for Tips & Downloads and for my Liquorman Utilities.

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Manchester, Gtr Manchester, England
    Posts
    299
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Find asterisk (2000/XP)

    Thankyou.

    I'd managed to find in Excel you use a ~ but couldn't find what to do in Access. Quite surprised I've never needed to do this before.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •