Results 1 to 3 of 3
  1. #1
    rachello89 is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Posts
    15

    Combo Box Display in Form


    I have a form that displays a client's products they have purchased. The form is also used to add new products. The field where they select a product is a combo box. I want to set up a query that only allows the drop-down to show products that are active. But when I set that up in the combo box's query, previous products they purchased that are now inactive will not display. It just shows a blank field. Thanks in advance for your help!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,602
    You have the form in datasheet or continuous view? That is a known issue with conditional comboboxes/listboxes in those views. I don't know any solution other than to display the value in a textbox.
    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.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    There's probably another way to do this, but like June7, I don't know it! This is a step-by-step I've posted before for others in your same situation:

    • In Form Design View, Right Click on your Original Combobox
    • Click on Change To
    • Click on Textbox
    • Right Click on your Original Combobox/Now Textbox, again
    • Click on Properties
    • Click on Other
    • Change the Name Property to ProductTextbox


    • Now, create a New Combobox, setting its RowSource to your new Query that excludes inactive products
    • Right Click on your New Combobox/[B]
    • Click on Properties
    • Click on Other
    • Change the Name Property from the name Access gave it to NewProductCombo
    • Leave this Control Unbound, i.e. leave the Control Source blank

    Now place this code in the Form's Code Module:
    Code:
    Private Sub NewProductCombo_AfterUpdate()
     Me.ProductTextbox = Me.NewProductCombo
    End Sub
    
    Private Sub Form_Current()
     Me.NewProductCombo = Null
    End Sub
    Linq ;0)>

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

Similar Threads

  1. Replies: 3
    Last Post: 08-19-2011, 09:25 AM
  2. Display 2 Columns in Combo Box?
    By 10 Gauge in forum Forms
    Replies: 3
    Last Post: 04-12-2011, 10:24 AM
  3. Combo box dafault display value !!!
    By Kazim in forum Access
    Replies: 1
    Last Post: 02-28-2011, 09:31 AM
  4. Replies: 7
    Last Post: 02-07-2011, 10:11 PM
  5. Combo Box Display
    By ssaucedo in forum Reports
    Replies: 17
    Last Post: 08-10-2009, 05: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