Page 2 of 2 FirstFirst 12
Results 16 to 23 of 23
  1. #16
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    I specify it directly.

    Im going to attach my DB and you are welcome to take a look if you can. it will really help out.


    Advanced Search is the form that gives the criteria and Advanced Query is the query.

  2. #17
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    Electrical_Mechanical_Contracts_Aug13_Public.zip

    Here is my DB.

    you are welcome to look through it if you can and see if you can find whats wrong with it lol.

    the form that adds the criteria is called Advanced search and the query is advanced query.

    thanks for any help

  3. #18
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  4. #19
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    I cant, It prohibits me.

  5. #20
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  6. #21
    Rawb is offline Expert
    Windows XP Access 2000
    Join Date
    Dec 2009
    Location
    Somewhere
    Posts
    875
    Here ya go!

    There were really only a few minor issues that were causing your problem, however because you were opening the Query directly (instead of as a Continuous Form), it was a little more complex to solve than I had anticipated.

    Basically, I did the following:
    • I changed the Default values on your Form from an empty string (" ") to nothing.
    • I changed the "Run Query" button so that it dynamically builds the SQL Query and then inserts it into your "Advanced Search" Query Object before running the Query.


    The code for this isn't actually as complex as it may seem when you first look at it so you should be able to change it as needed for future use.
    Attached Files Attached Files

  7. #22
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    You sir, are amazing.

    I have alot of VB to learn all over again, but I am seeing patterns in the code and i can figure out how I can modify it to add more criteria.
    Thankyou, Thankyou Thankyou!

  8. #23
    dbalilti is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2012
    Posts
    53
    One last Question, How would i do this for a Boolean (Yes/No) Field on VB?


    AND maybe another, I am trying to add another field into the Advanced search query and every time i add it and run the advanced search form, the field disapears.

    Help please@!

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

Similar Threads

  1. Converting dBase forum to Access forum
    By amerifax in forum Forms
    Replies: 5
    Last Post: 07-03-2012, 01:12 AM
  2. Replies: 11
    Last Post: 01-12-2012, 07:55 PM
  3. Replies: 2
    Last Post: 11-25-2010, 11:01 AM
  4. Sorting in a Query (Dates)
    By JohnS in forum Queries
    Replies: 2
    Last Post: 10-23-2009, 03:51 AM
  5. Is this a Query or Sorting problem?
    By bwrobel in forum Queries
    Replies: 2
    Last Post: 07-14-2006, 08:15 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