Page 2 of 2 FirstFirst 12
Results 16 to 21 of 21
  1. #16
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771

    If you want to provide db for analysis (follow instructions at bottom of my post) I will give it a try. I've never actually set up queries like this, not sure what you want is practical. The only possible alternative is a VBA procedure to construct criteria string.
    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.

  2. #17
    noobaccess is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    22
    the file seems too big for me to attach it! hahaha! i tried deleting whatever that is not needed but the file size is just too large!

  3. #18
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    You ran compact & repair? Zipped? Still too big - option is upload to fileshare site such as box.com and post link to file.
    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. #19
    noobaccess is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    22
    oh! for some reason it can be uploaded now!!!

    Thanks thanks!! )
    Attached Files Attached Files

  5. #20
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,771
    Controls used to input search criteria should NOT be bound. Otherwise, will change data in the record. There is no reason for the search form to be bound unless you want to also use it to display the filtered records. To do that, put unbound search controls in form header, bind form to the parameterized query, put controls in detail section to display data, use code to requery the form. One of the tutorials referenced earlier demonstrates this.

    Now that I can fully examine the query, I see that you are not using the Search textbox as criteria for each field. You reference it only under CompanyName. Missing LIKE and wildcard for the BusinessNature criteria. The complication in this query is the PricePoint. Handle if this criteria is not input by user by using Nz function and an alternate value large enough to accommodate any value in the data:

    <= Nz([Forms]![Prospect Table search].[Tag],9999)

    Use the same technique for date/time criteria if you ever need it:
    BETWEEN Nz([Forms]!formname.fromdate,#1/1/1900#) AND Nz([Forms]!formname.todate,#12/31/2900#)
    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.

  6. #21
    noobaccess is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Nov 2012
    Posts
    22
    ohh! thanks! but i have a silly question to ask you..

    To do that, put unbound search controls in form header, bind form to the parameterized query, put controls in detail section to display data, use code to requery the form. One of the tutorials referenced earlier demonstrates this.
    how do i do this? btw, i cannot unbound my dropdown list because the data that are suppose to be display in the dropdown list will then be gone.

    so does that mean that i need to set the criteria for each field? so i have to put criteria under all the other fields? but wouldnt it clash with those criteria in the dropdown list? i tried using LIKE and Wildcard for BusinessNature but it will not show the results that i select instead it will show every other business nature.

    hmm... can you explain what does the 9999 means? i tried changing the criteria that you have given for my pricepoint but it doesnt seems to work...
    or would you suggest for me to do another way to search for my pricepoint?

    Thank you very much!!!
    Last edited by noobaccess; 12-09-2012 at 09:20 PM.

Page 2 of 2 FirstFirst 12
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Search mulitple fields
    By wgroenewald in forum Forms
    Replies: 1
    Last Post: 02-23-2012, 11:46 AM
  2. Fields get saved in DB when I search!
    By accessnewb in forum Programming
    Replies: 2
    Last Post: 07-25-2011, 09:44 AM
  3. Search across multiple fields
    By Nexus13 in forum Programming
    Replies: 2
    Last Post: 07-08-2011, 02:38 PM
  4. Help with Search Fields
    By jhawk in forum Forms
    Replies: 2
    Last Post: 03-16-2011, 08:42 AM
  5. Help with Search Fields
    By jhawk in forum Programming
    Replies: 0
    Last Post: 03-15-2011, 08:05 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