Results 1 to 6 of 6
  1. #1
    Join Date
    Oct 2010
    Location
    NJ, USA
    Posts
    9

    Form/Query Display Results Question

    Hey there, quick question about Access 2007.

    First off, I'm basically self-teaching myself Access 2007 for my job, so I apologize in advance if this question is dumb, or I don't understand a reply.

    Basically, I have a form called "Find Part Form", and a query set up to look under my "Customer" Table that has a "Part Number" column-- everything goes fine and the button works.



    The issue I'm having is that in my box, where I have the part number I want to look up, when I find it and click the "Find Results" button I made (that launches the query) it opens the query with ALL the part numbers and not just the ones I'm searching for. Is there any way to just display the Part Number w/ the "Customer", "Part Number", "Quantity" and "Location"? (I can figure out how to add the fields, the bigger issue is the only displaying results I need).

    Thanks in advance,
    AcmeGearSteve

  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
    I would likely use this technique to open a form:

    BaldyWeb wherecondition

    If you want to open a query, which most of us don't let users access directly, you'll need to add a criteria to the query that looks to the form where you entered the number.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Join Date
    Oct 2010
    Location
    NJ, USA
    Posts
    9
    Quote Originally Posted by pbaldy View Post
    I would likely use this technique to open a form:

    BaldyWeb wherecondition

    If you want to open a query, which most of us don't let users access directly, you'll need to add a criteria to the query that looks to the form where you entered the number.
    Wow, I think this is exactly what I want!

    I guess I don't want the query to be viewed, I had it set to Read Only so it wouldn't've been that big of a deal, but I think what you posted is exactly what I needed.

    Now, my bigger question, with the coding in that link, can I just right-click and drop that in the SQL view or do I have to do it in VBA? Like I said, I'm pretty new to this-- I can dissect the code and figure out what values to change, I'm just not sure where to put it.

    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
    The code in my link is VBA code. It would go here if you've never used VBA:

    http://www.baldyweb.com/FirstVBA.htm

    You can also use a macro.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  5. #5
    Join Date
    Oct 2010
    Location
    NJ, USA
    Posts
    9
    Quote Originally Posted by pbaldy View Post
    The code in my link is VBA code. It would go here if you've never used VBA:

    http://www.baldyweb.com/FirstVBA.htm

    You can also use a macro.
    Thanks again, I'm just going to read through your whole tutorial listings and work from there; seems like the stuff I need.

  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
    I hope it helps; I've tried to include a lot of common problems there. Post back if you get stuck.
    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. Replies: 6
    Last Post: 05-14-2012, 07:24 AM
  2. Display Query Results on a Form
    By P5C768 in forum Queries
    Replies: 5
    Last Post: 05-04-2010, 11:04 AM
  3. display query results in a form
    By P5C768 in forum Queries
    Replies: 3
    Last Post: 08-14-2009, 03:02 PM
  4. Form to display results
    By Zholt in forum Forms
    Replies: 9
    Last Post: 05-07-2009, 10:09 AM
  5. Replies: 1
    Last Post: 02-27-2006, 07:46 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