Results 1 to 3 of 3
  1. #1
    Texam1970 is offline Novice
    Windows 11 Office 365
    Join Date
    Aug 2023
    Posts
    2

    Embedded Macro using Where Condition = clause and selection criteria with wildcards does not workk

    I'm using an embedded macro using a combo box. When I build the embedded macro I use an IF statement to open a report and the report is feed by a query. When I enter an exact value in the Where clause, the report executes perfectly and I receive all the desired records. However, I want to use a wildcard in the Where clause, when I do that it doesn't seem to work.



    For example, Where Condition = [Query1]![Name] = "Smith" I correctly get all Smith records. BUT, if I try to use a wildcard like [Name] = "Sm*", I get no records

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Try:

    [Name] LIKE "Sm*"
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    Texam1970 is offline Novice
    Windows 11 Office 365
    Join Date
    Aug 2023
    Posts
    2
    It worked GREAT, thanks so much!!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 08-11-2015, 10:53 AM
  2. VBA to Embedded Macro
    By mrmims in forum Macros
    Replies: 4
    Last Post: 03-11-2014, 01:28 AM
  3. Replies: 2
    Last Post: 06-30-2013, 09:59 AM
  4. Replies: 1
    Last Post: 02-09-2012, 11:33 PM
  5. Type mismatch in condition embedded macro
    By geremore in forum Programming
    Replies: 3
    Last Post: 08-09-2011, 02:05 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums