Results 1 to 2 of 2
  1. #1
    MarkA70 is offline Novice
    Windows 10 Access 2010 64bit
    Join Date
    Jan 2016
    Posts
    6

    How to programmatically set the Like value in a DoCmd Open form statement


    I need to set the Variable for the LIKE portion of a DoCmd form filter to an external value. If I use the filter without the LIKE it is no problem, that is, I can set the value of the Filter as "Last = Forms![frm_Hidden]![Hidden_txt0]", when using the LIKE I cannot get it to work, even though the value in the txt0 dox is X* where X is any alpha character. What do I need to do?????

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    there is no LIKE in docmd,
    for filter use:

    me.filter = "[field ] like *" & txtBox & "*"
    me.filteron = true

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

Similar Threads

  1. Replies: 4
    Last Post: 09-16-2014, 03:32 PM
  2. docmd.open form between dates condition
    By Ruegen in forum Programming
    Replies: 6
    Last Post: 09-22-2013, 11:23 PM
  3. Replies: 2
    Last Post: 10-13-2011, 09:14 AM
  4. problem with my DoCmd.RunSQL statement
    By cgclower in forum Access
    Replies: 1
    Last Post: 07-24-2011, 06:12 PM
  5. Select / DoCmd to open another form
    By chrisjack001 in forum Access
    Replies: 1
    Last Post: 08-24-2010, 12:31 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