Results 1 to 4 of 4
  1. #1
    finance600man is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    2

    Filter for Multiple Queries/Combo Box

    All,

    I am attempting to use a macro built behind a command button. There are no problems with it, however, I cannot create a statement which would apply to all the queries running.

    What I am trying to do is create a prompt or input that would apply to all the queries (input date). The way it is setup currently, it is asking me for a date prompt on every single query as it runs. Would I be better off to write a form in VB?

    The second part of the question is on a combo box I built. The box uses the drop-down menu from a table. It is using VB such that when the change happens, it should apply the change to the query that runs after the change. In the filter section of the query it says to refer to the date being selected from the combo box. My problem is that every time I attempt to make a selection it tells me there is some kind of error related to date.



    Any input would be greatly appreciated.

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    In part 1 - the approach to take is not to use parameter queries that force a parameter prompt as each query opens. Instead; have a textbox in your form that holds the date - and have those queries call that info. Syntax in your query criteria would be something like this:
    Forms!YourFormName.TheDateTextBoxName

    As to part 2; if a combobox is throwing "some kind of error related to date" when you attempt to make a selection - - why is difficult to ascertain from the info posted. You might simply consider deleting that combobox and making a new one fresh.

    hope this helps a little.

  3. #3
    finance600man is offline Novice
    Windows Vista Access 2003
    Join Date
    Aug 2010
    Posts
    2
    With respect to part 2, I tried to retrace my steps on a new box, but I am not sure where the error has occured. Can you offer some troubleshooting advice? I can't exactly figure out how to trace the error.


    Quote Originally Posted by NTC View Post
    In part 1 - the approach to take is not to use parameter queries that force a parameter prompt as each query opens. Instead; have a textbox in your form that holds the date - and have those queries call that info. Syntax in your query criteria would be something like this:
    Forms!YourFormName.TheDateTextBoxName


    As to part 2; if a combobox is throwing "some kind of error related to date" when you attempt to make a selection - - why is difficult to ascertain from the info posted. You might simply consider deleting that combobox and making a new one fresh.

    hope this helps a little.

  4. #4
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    The answer depends on exactly when the error shows. If the error occurs when you attempt to select inside the combobox (which was my first impression) - making a new combobox would be a first step.

    If the error occurs when the query runs - - then one must inspect that more closely. Not sure I can do that based on the info posted.

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

Similar Threads

  1. Filter form from multiple combo boxes
    By Bird_FAT in forum Programming
    Replies: 6
    Last Post: 05-19-2010, 09:32 AM
  2. Combo box and filter query
    By thart21 in forum Forms
    Replies: 7
    Last Post: 04-06-2010, 11:37 AM
  3. Filter by combo box & text box?
    By sparkyboy2406 in forum Forms
    Replies: 2
    Last Post: 02-24-2010, 04:20 PM
  4. Combo Box Filter
    By jgelpi in forum Programming
    Replies: 3
    Last Post: 07-27-2009, 12:54 PM
  5. Applying a filter to a combo box
    By bugchaser in forum Programming
    Replies: 1
    Last Post: 02-20-2009, 02:37 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