Results 1 to 6 of 6
  1. #1
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776

    ComboBox text blank unless you click on it question?

    New Profile.zip



    Hi all,
    I attached a sample db, opens to Company Form (frmCompany),

    I just need someone to explain to me about a combo box on my sub form. Subform (sfrmEnity) and is a continous form, has two combos in it and some txt boxes.

    What I dont understand is why when i select from the first combo in subform, it stays put so to speak, and when i select from the second combo, and go to next,
    it disappears until i click on it again. I know i can put a txt box over it but i just want to understand why I have to do that. The value is stored in table as a separate record
    so i just dont understand why it doesnt stay visible after adding a new record/

    Can someone please explain this to me or let me know what i am doing wrong with it. I can use the txtbox thing which i would not perfer but i need to understand why
    this happens to begin with.

    Thanks
    Dave

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,522
    Check your BOUND COLUMN & column widths

    example:
    if combo has 2 columns: key, Name
    and the combo is bound on col1 ,key
    then picking "bob" may not show an answer since its looking for 321 (key)

    normally there's no problem with a combo with 1 column.

    I just saw your example. The table you are storing data may be keyed to prevent other entries.

  3. #3
    d9pierce1 is offline Expert
    Windows 10 Access 2016
    Join Date
    Jan 2012
    Location
    Oklahoma
    Posts
    776
    greetings,
    It picks just fine and if i keep the same selection in the first column it shows them all, if i change the first column to a different selection, then they disapear. the values will only stay visible with the same select in first col

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,776
    Can't say I've ever seen this before, but here's what doesn't look right:
    Your combo rowsource is
    Code:
    SELECT ExtHelperValueID, ExtHelperID, ExtHelperValue FROM tblExtHelperValue WHERE ExtHelperID = cboExtHelper ORDER BY ExtHelperValue;
    If the PK for the combo field is ExtHelperID then when I look at your table, that field has 7 values all the same (1). That doesn't seem right. A combo value (when the bound column is the first column) should be going in to the PK field of the related record. I suppose that Access will store the value in the table field for you, but when it's bound column has 7 values, it doesn't know which one to show you. If that's not it, I am stumped for the moment. Regardless, I will offer that it's unusual to bind a combo to a field that can contain multiple values that are the same. In fact, it's not something I'd think to do.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,776
    It could also be your combo requery on the GotFocus event. If you must requery because of added values, then GotFocus is not the place to do it. Things seem to work better when your requery is reinstated on the afterUpdate event and disabled on GotFocus, but still not the right place to requery the combo, assuming it ever needs to be done. I still think you have an issue by your combo not being bound to a unique index.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,892
    cboExtHelperValue is a cascading combobox - its list is dependent on selection in cboExtHelper. It is well-known issue that cascading combobox using alias (displayed info is not value saved) does not work nice on continuous or datasheet form. When the list is filtered, alias data is not available for display on records that contain the filtered ID's. Common topic.

    Workaround is to include lookup table in form RecordSource, bind textbox (Locked Yes and TabStop No) to the descriptive text field or use DLookup() expression in textbox to retrieve the descriptive info. Sit textbox on top of combobox.
    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. Combobox change width on click
    By bilalo in forum Forms
    Replies: 7
    Last Post: 07-20-2019, 01:33 AM
  2. Clear combobox on click
    By khayward in forum Forms
    Replies: 1
    Last Post: 07-03-2018, 08:59 AM
  3. Replies: 7
    Last Post: 11-11-2014, 06:10 PM
  4. Replies: 5
    Last Post: 08-12-2013, 10:00 PM
  5. Combobox drop down on click
    By ashu.doc in forum Forms
    Replies: 2
    Last Post: 09-19-2012, 08:02 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