Results 1 to 4 of 4
  1. #1
    atom is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    43

    Search form criteria


    I have a form where the user selects a value from a combobox.
    The value of combobox is used in criteria of subform like this :
    Code:
    Like [Forms]![SearchForm]![cmb1] & "*"
    The problem I have is that the values in combobox are stored based on ID so if the user selects e.g. 1 , the results come with : 1, 11,12,13,14 (whatever it has 1 on it ) .
    I would like to display only the specific selection (at this point 1)

    I tried to remove "*" from the criteria but then the other comboboxes in form don't work together...

  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Did you try :
    = [Forms]![SearchForm]![cmb1]

    Thanks

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Try: Like Nz([Forms]![SearchForm]![cmb1],"*")
    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.

  4. #4
    atom is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    43
    Thank you very much
    It worked!!

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

Similar Threads

  1. Multiple Search Criteria Form
    By J77TDC in forum Forms
    Replies: 3
    Last Post: 08-09-2011, 08:50 AM
  2. Replies: 2
    Last Post: 07-12-2011, 07:53 PM
  3. Search Criteria
    By Meccer in forum Forms
    Replies: 1
    Last Post: 04-01-2011, 12:53 PM
  4. Search By Criteria - Flexible Criteria Fields
    By lilanngel in forum Access
    Replies: 0
    Last Post: 03-16-2011, 06:25 PM
  5. search criteria in a form fails!
    By maxbre in forum Programming
    Replies: 2
    Last Post: 12-01-2010, 06:21 AM

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