Results 1 to 4 of 4
  1. #1
    warren0127 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    May 2015
    Posts
    69

    Combobox Values are Disappearing

    Hello,



    I have created a subform that lists three comboboxes for organizations and are cascading (dependent on each other) depending on which selection the user makes. IE: Combobox B will only show items that are tied to whatever selection the user made in Combobox A.

    The comboboxes are:

    Customer Organization (cboCustomer1)
    Sub Organization (cboSubOrganization1)
    POR (cboPOR1)

    All of this is working fine.. but the issue appears when the subform loses its focus. So what happens is, the second and third comboboxes are "blanked out" in all records when you go back and look at the form.. all except the "First" record of the subform (first record data seems to still appear fine)

    ..And the values are being stored in the table and all seem to appear there fine.. but still disappears in the form itself...

    I have included this VBA in the form as instructed in a previous tutorial I followed:

    Code:
    Private Sub cboCustomer1_AfterUpdate()
    
    Me.cboSubOrganization1.Requery
    Me.cboSubOrganization1.Value = ""
    
    
    Me.cboPOR1.Requery
    Me.cboPOR1.Value = ""
    
    
    End Sub
    
    Private Sub cboSubOrganization1_AfterUpdate()
    
    
    Me.cboPOR1.Requery
    Me.cboPOR1.Value = ""
    
    
    End Sub
    Any idea what I am doing wrong? Again, the cascade logic seems to work fine - just would like the values to not disappear after scrolling past the first record.

    Thanks for your help.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,527
    Me.cboPOR1.Value = ""
    means the value will disappear.

  3. #3
    warren0127 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    May 2015
    Posts
    69
    I took out the Me.cboSubOrganization1.Value = "", and the Me.cboPOR1.Value = "" and ran the program again.

    Still continues to blank out the second and third dropdowns - but keeps the first dropdown box value. Also, when clicking in the second and third dropdowns, it shows the dropdown choices relevant to the previous record's dropdowns...

  4. #4
    warren0127 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    May 2015
    Posts
    69
    Apologize for the double post here - but has anyone else had something similar happen to them with what I am experiencing?

    Appreciate any help on this.

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

Similar Threads

  1. Replies: 3
    Last Post: 03-02-2016, 06:05 PM
  2. Replies: 8
    Last Post: 07-09-2014, 08:00 AM
  3. Replies: 8
    Last Post: 06-12-2014, 05:25 AM
  4. Combobox setting other combobox values problem
    By maxmaggot in forum Programming
    Replies: 8
    Last Post: 06-30-2013, 07:18 AM
  5. Values in a combobox
    By kbp in forum Access
    Replies: 2
    Last Post: 02-01-2011, 03:53 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