Results 1 to 11 of 11
  1. #1
    nobuhle is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    5

    Drop Down Menu selection appears on all records

    Hello. I am just learning Access, teaching myself actually. In the database I've created, I've added a combo box to some of the forms that allows me to select answers from a drop down menu. When I select an item from the drop down menu, that value appears on every record which prohibits me from entering the correct data in the field.

    For example: I have one table called "Inventory" which contains a "Category" foreign key. I have a "Categories" table only consisting of only a primary key field and a "category" field. I've already populated all the fields there. On the "Inventory" form I created, I added a "Category" field. I already created a relationship with the category field of the categories table to the Category_FK field of the Inventory table. On the form, the drop down displays properly and allows me to select the criteria, however, when I go to another record and try to enter a different category, the latest selected category applies to all the records stored in this table.



    I'm sure there is an easy solution to this. I just can't seem to find it. Is there anyone there who can assist me with this issue?

  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
    On the form, does the combo have a control source of the field in the table? Doesn't sound like it.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    This will happen if your combo box is not bound to a field in the form's underlying table or query. Check the "Control Source" property of the combo box.

    John

  4. #4
    nobuhle is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    5
    Yes. The control sourse is Category_FK

  5. #5
    nobuhle is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    5
    I've verified that the control source is "category_FK"

  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
    Is that the field in the category table or the field in the inventory table (which is what it should be)?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    Can you post the db here?
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Two questions -

    What is the record source for your form - table or query?

    Is there any VBA code in the category combo box that runs after you make a selection from it?

    One possibility is that the relationship is wrong. Make a backup copy of your database, and then delete the relationship to see if that has any effect. I said make a backup because without seeing your database, it's hard to know what side-effects deleting the relationship might have.

    John

  9. #9
    nobuhle is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    5
    It is in the inventory table. I tried to send the db but the file size was too big so I'm sending a couple screen shots. Hopefully i'm sending the info that answers you.

    Click image for larger version. 

Name:	Categories Table.jpg 
Views:	8 
Size:	153.5 KB 
ID:	17429Click image for larger version. 

Name:	Inventory Form Design.jpg 
Views:	9 
Size:	244.7 KB 
ID:	17430Click image for larger version. 

Name:	Inventory Table Design.jpg 
Views:	9 
Size:	169.3 KB 
ID:	17431Click image for larger version. 

Name:	Relationships.jpg 
Views:	8 
Size:	136.0 KB 
ID:	17432

  10. #10
    nobuhle is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Jul 2014
    Posts
    5
    The record source is the Inventory. I didn't write any VBA code...don't know how. I've uploaded some screenshots to pbaldy. Can you tell if any code is written on these screenshots? I couldn't upload the db bcuz the filesize was too big.

  11. #11
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,919
    From what I can see in the images, the setup looks proper.

    Did you run Compact & Repair then zip the file? 2MB zip allowed. Unless you have a LOT of records, 2MB should be enough, otherwise make copy and delete some records.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Auto text based on drop menu selection
    By mandykoonts in forum Forms
    Replies: 6
    Last Post: 01-06-2014, 04:17 PM
  2. Replies: 2
    Last Post: 08-14-2013, 04:29 PM
  3. Drop down menu help
    By whojstall11 in forum Access
    Replies: 6
    Last Post: 03-07-2012, 01:51 PM
  4. Replies: 3
    Last Post: 11-29-2011, 07:01 AM
  5. Replies: 1
    Last Post: 03-15-2010, 02:52 PM

Tags for this Thread

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