Results 1 to 8 of 8
  1. #1
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27

    Combo box Query no working

    I have a combo box and the selection is from a table. I want to return the results to my Query but it's not working, in Criteria I have: [Forms]![PartsOrder]![PartAddCmbo]
    From what I have found this should produce a result but when I run it I get no result in the Query. Is there a way I can see what information is going got this query?

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Can you show us the SQL of the query and the SQL of the combo's Row Source property.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    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,849
    As Bob has suggested, more info is required to help the reader with your real need.

    Perhaps you could describe to us in plain English WHAT you are trying to do, and then seek options of HOW it may be done.
    Seems you have told us more of HOW you have done something, and have not told us about the WHAT.

  4. #4
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27
    The combo box is in a from and in the footer, the form is used to place parts on order when the inventory level is lower then a set value (reorder point). So I have the form base on a query result. What I want the combo box to do, allow the user to add a part from the parts table to an order when the order does not meet the reorder criteria. I want to return the result of the combo box to the query and have the query update the part by checking a check box(Manual Order). In my reorder query I have the criteria were it looks to this information. Then it requerys and returns the result to the form so the user can enter a date and quantity. To make sure I am not crazy I tried to put this in its own form just to check if it's a problems with in the form I made and I get the same results. Here is the information you requested..

    Query:
    UPDATE Parts SET Parts.ManualOrder = Yes
    WHERE (((Parts.PartNo)=[Forms]![PartsOrder]![PartAddCmbo]));

    The combo box in the form does not have any SQL but here is the statement in Row Source Type
    SELECT [Parts].[PartID], [Parts].[PartNo] FROM Parts;

    The other querys work fine I checked the box my self and ran so that is not the problem. I have changed the type of query to a select just to see what type of result I am returning and I get no return back.

  5. #5
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    I think your problem is caused by the fact that your combo box has two columns (PartID and PartNo). You may only be seeing the "PartNo" value but when you make a selection you are actually selecting "PartID".
    Instead of:
    WHERE (((Parts.PartNo)=[Forms]![PartsOrder]![PartAddCmbo]));
    Try:
    WHERE (((Parts.PartID)=[Forms]![PartsOrder]![PartAddCmbo]));
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  6. #6
    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,849

  7. #7
    Loc is offline Novice
    Windows Vista Access 2007
    Join Date
    May 2013
    Posts
    27
    You got it Bob it works! I see it now some times when you look at things the answer is right there in front of you but you just don't see it.

    Thanks a bunch, now to move on and make more problems..LOL

  8. #8
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    You're welcome. Glad we could help.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

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

Similar Threads

  1. Why aren't my Combo Boxes working?
    By djclntn in forum Forms
    Replies: 2
    Last Post: 02-15-2013, 04:50 PM
  2. Replies: 4
    Last Post: 01-31-2013, 05:29 AM
  3. Combo Box search not working
    By Lowell in forum Forms
    Replies: 1
    Last Post: 06-02-2012, 12:53 AM
  4. Working of Combo boxes in Form
    By suryaprasad in forum Forms
    Replies: 3
    Last Post: 06-29-2011, 11:54 AM
  5. Working with Two Combo boxs
    By Della Smith in forum Database Design
    Replies: 2
    Last Post: 08-01-2008, 02:52 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