Results 1 to 5 of 5
  1. #1
    hawzmolly is offline Advanced Beginner
    Windows 7 Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77

    Combo Box problems

    I have 9 unbound combo boxes on my form and I have 9 bound combo boxes. The purpose of the unbound combo boxes is to popup a list of choices for my staff to choose from. One of the 9 unbound combo boxes is a straight query to open the appropriate table. This combo box may be opened any number of times and any number of choices may be made.

    I have the other 8 boxes coded as “On click “[Enter 4 digit code for siding location]”” on the table field query of the same table as the one i.e., 1st in order, combo box. When they make their choice 3 text fields are filled in on the table for each combo box. This is what I need to have happen. However, on 8 of the unbound combo boxes after staff has made a choice and the text boxes fill in they see that they have made the wrong choice. When this happens they click on the open arrow the “OnClick “[Enter 4 digit code for siding location]”” will not present the popup box. The field for the combo box just returns the initial choice.
    My question is – How do I code the combo box “After Update”, if this is the way to go, to clear the data such that they can reopen the popup. I have tried the following code:

    Private Sub Combo183_AfterUpdate()
    Me.txtSpot1.Value = Me.Combo183.Column(1)
    Me.txtSiding1.Value = Me.Combo183.Column(2)


    txtCar1.SetFocus
    DoCmd.Requery
    End Sub

    This does not work. It does popup a different popup labeled “Forms!myForm!myControl”. If I enter the code and say OK the [Enter 4 digit code ….] pops up but does not work. I am baffled. If I click on the combo box nothing happens except to open as blank. Please help.

    See screen shots attached. The combo boxes down the right side are the trouble makers.
    Attached Thumbnails Attached Thumbnails ScreenShot1.JPG   ScreenShot2.jpg  

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    I am not understanding what data you want to "clear". The afterupdate you have there is assigning values from what may be unbound combos to controls. Then you shift focus somewhere and then you requery. I am surprised you are not getting a runtime error on the Requery. I do not believe you can requery a textbox control.

    What data do you want to clear? Do you have bound controls that you want to clear?

  3. #3
    hawzmolly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77

    Angry Combo box problems

    I have attached 2 screen shots. “Screen Shot with Numbers (SSN)” and “Screen Shot 1 (SS). The zip file of the DB is also attached. You will be working with Table “TrainName” and form “frmTrainName”

    To explain:
    Open SSN. Also open SS. May I also suggest you open the database and then “Build Switch Lists”. You will notice that a screen like SSN will load but w/o the “Cx”. At the top note the “Read Instructions” button. Opening this may help more in understanding the purpose of the DB.

    Referring to SSN please note the captions “Cx” on 12 locations. When we want to build the switch list we click on combo C1, make a choice and click on it. All the text boxes will load. Note that you can go back and reopen the C1 combo box and change the choice. Now open C2 and make a choice. All boxes labeled C2 will fill in and C3 will open as a popup “Enter 4 digit code for siding locations”. This code Is from the query for C3 combo (combo183 (AbrevS)) of the DB. Type in any of the 4 digits i.e., APSW from “AbrevS” . The combo opens with several choices that can be used. Operator picks one and all C3’s load as well as C4 pops up.

    Now the problem I need to solve begins. Go back to C2 and reopen it. Note that you can choose another i.e., “DUCK”. Click on DUCK and notice what C3 does. It will be the choices for “APSW”. This is NOT what I want. My understanding of Access seems to stop here as I cannot figure out what to do to be able to reopen the C3 combo.

    The only difference between C1, C2, and C3 is the need to “Enter 4 digit code for siding locations” for C3 and the same for the other 7 lines.
    Any of the other 7 lines once opened does not allow the user to reopen the combo box. Clicking on it results in a blank or a repeat of the initial opening.
    Thanks in advance for any help anyone can provide.
    Attached Thumbnails Attached Thumbnails ScreenShot1.JPG   ScreenShot1withNumbers.jpg  
    Attached Files Attached Files

  4. #4
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    cross posted here

    http://www.access-programmers.co.uk/...d.php?t=289046

    @hawzmolly - please read this thread about cross posting http://www.excelguru.ca/content.php?184

  5. #5
    hawzmolly is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    Oct 2008
    Location
    Green Bay, WI
    Posts
    77
    Did not know about "Cross Posting". Will try to remember to do same as your example. There are members of both sites that have given me very good advice and were able to clear up the same problem in different ways. Thanx

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

Similar Threads

  1. Problems with combo box in subform
    By msmithtlh in forum Forms
    Replies: 4
    Last Post: 11-12-2014, 09:34 AM
  2. Problems with Combo Boxes Again
    By djclntn in forum Forms
    Replies: 30
    Last Post: 03-13-2012, 09:03 AM
  3. combo box problems
    By metokushika in forum Access
    Replies: 2
    Last Post: 11-09-2011, 03:01 AM
  4. Replies: 2
    Last Post: 03-04-2011, 10:12 AM
  5. Form Combo problems
    By Honeytree in forum Forms
    Replies: 0
    Last Post: 10-05-2008, 01:32 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