Results 1 to 8 of 8
  1. #1
    access1234 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    11

    Angry Need help with a type of report

    I have in my input form a field that contains a down arrow with about 20 location names where I have projects (ex: Florida, New York, France, UK….and so on). I want to create a report based on a location (to see all the projects for that location) but I don’t want to type it rather to see the same down arrow this way I can pick it from the list before the reports is run.


    Please note I am not an expert but have some OK knowledge of access.
    Anyone can help?
    THANKS

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You can create a report that returns all locations, then use this technique to restrict it to the selected item:

    BaldyWeb wherecondition
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    access1234 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    11
    Thanks dbaldy but I am not sure what you mean. In other reports I have, for example, if I want to run a report based on range of dates, before the repost runs, it ask me to enter the first and then the last date. Basecaly I want to do a similar thing where it will ask me for the location but instead of me typing it, I would like to pull it from my preset list of that field.
    I am not sure If I am making myself clear. Any idea?
    Thanks

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    You're using bracketed criteria, like [Enter start date]? If so, you can't get a list. The only way to get a list is to use a form for the user to enter criteria. In that scenario, instead of the above criteria you have this in your query (changing the names):

    Forms!FormName.txtStartDate

    or you can use the technique in the link.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    access1234 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    11
    Thanks for your help so far. I think I am getting to understand your first theory with a second fgorm. My question (and this is because I am not an expert) where do I place this: DoCmd.OpenForm "SecondFormName", , , "FieldName = '" & Me.ControlName & "'"
    Thanks

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    That is VBA code. It would often be in the click event of a button. If you've never used VBA before:

    http://www.baldyweb.com/FirstVBA.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    access1234 is offline Novice
    Windows XP Access 2007
    Join Date
    Feb 2011
    Posts
    11
    Dbaldy, Thank you for all your help. My database works FINE thanks to you.

  8. #8
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    No problem, happy to help. Welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. How do I fix the #type!
    By Shortone in forum Access
    Replies: 3
    Last Post: 12-02-2010, 11:34 PM
  2. Need help on creating a type of Report
    By Accessorize in forum Reports
    Replies: 1
    Last Post: 08-20-2010, 02:57 PM
  3. Replies: 2
    Last Post: 03-18-2010, 08:24 PM
  4. Type in a SQL query
    By JonJacobs in forum Queries
    Replies: 2
    Last Post: 10-29-2009, 10:01 AM
  5. Type Mismatch - HELP!
    By jgelpi in forum Programming
    Replies: 3
    Last Post: 07-17-2009, 03:53 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