Results 1 to 8 of 8
  1. #1
    corystemp is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2009
    Location
    Kennewick,Wa
    Posts
    14

    Change to selection in combo box

    I create a combo box that after every entry it adds the new part number to that box. the problem i am having is that altough it adds the part numbers correctly as i add them when i make the selection in the combo box it doesnt change to that part. How can i make it so when i pick a part int he combo box the record on the screen changes to that one?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Use the ComboBox wizard and select #3 and you will see how to achieve what you want. Then incorporate the code in your current cbo and delete the wizard created one.

  3. #3
    corystemp is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2009
    Location
    Kennewick,Wa
    Posts
    14

    new problem

    That worked. now the problem i am having is that when i click on my button to add a new record, it works fine and i get a clear form, i add the info and it saves just fine. the problem is after i enter that info. It doesnt show up in the combo box till i close the form and reopen it. not even if i save it. how do i get it do instantly appear in the combo box or after i click save so i dont have to close the form everytime.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Since the control in now not bound you need to create a procedure that places the field you want in the window of the control. Then call that procedure from the OnCurrent event of the form.

  5. #5
    corystemp is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2009
    Location
    Kennewick,Wa
    Posts
    14
    sorry but how do i do that?

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    With the form in design mode on the event tab of the properties sheet, go to the OnCurrent Event row and press the "..." button which should take you to the code module. Does it?

  7. #7
    corystemp is offline Novice
    Windows Vista Access 2007
    Join Date
    Mar 2009
    Location
    Kennewick,Wa
    Posts
    14
    that gets me to the code module, but what do i select in this spot?

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Me.ComboBoxName = [YourFieldName]
    ...should do it; using your names of course.

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

Similar Threads

  1. Combo Box field selection help needed
    By techexpressinc in forum Forms
    Replies: 8
    Last Post: 04-01-2010, 09:42 AM
  2. Checking List Box Value with Combo box selection
    By empyrean in forum Programming
    Replies: 1
    Last Post: 10-23-2009, 06:01 PM
  3. Replies: 1
    Last Post: 10-19-2009, 02:37 AM
  4. Replies: 1
    Last Post: 08-26-2009, 10:45 AM
  5. Replies: 3
    Last Post: 02-26-2009, 10:17 AM

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