MS Access QBE Syntax Issue

Posted on 2007-07-30
Last Modified: 2010-05-18
My query is this...

HAVING (((THDWH1_MYTRANS.SOURCEKEY)='%' & [Enter Order Number]));

This prompts the user to enter criteria.  I would like to have a wildcard before their entry, however, I can not determine how to string both together (I attempted the '&' to tie the wildcard to the [enter order number]).
Question by:Derek_Indianapolis
    LVL 61

    Accepted Solution

    HAVING (((THDWH1_MYTRANS.SOURCEKEY) LIKE '*' & [Enter Order Number]));

    Use LIKE instead of =
    * is the all-inclusive wildcard in Access.

    Author Comment

    LVL 61

    Expert Comment

    Glad to help!

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
    Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
    Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    731 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now