Results 1 to 14 of 14
  1. #1
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7

    Combo Box Challenge-Not on List and Default Value

    May I ask for assistance pls. I have a form with two separate combo boxes on it. In each case an eight digit number is entered into the field, the 'On Not on List' event procedure is used when the numbers are not found and they are bound to a table and stored.

    We have recently had a change to our system and both numbers are now going to be the same. Rather than making someone re-enter the information as second time in the second combox box I want to have the same number that is entered and saved in the first combo box entered as as a default number in the second one and then have the 'On Not on List' come up to verify it and add it to the second table.

    I have tried just about everything but have been unsuccessful. I can get the number to show up but the 'Not on List' will not come up to add it.

    Can anyone assist. Any help grateful accepted.



    Regards,
    Alice

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I take it for some reason you do not want to remove the 2nd ComboBox? May I ask why?

  3. #3
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7

    Combo Box Challenge-Not on List and Default Value

    No, the combo box actually is needed for other entries that are not duplicated to the first box as well. My challenge is that the 'not on list' is what saves the number to the table so I want it to be saved either way if possible.

    Thank you. My apologies for the delay in responding, I couldn't get back into the forum.

    Alice

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Is the 2nd cbo bound to a field in a table?

  5. #5
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7
    Yes it is.

    Alice

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Most events in the system are *only* invoked by the user doing something. Having said that, once you have code running there is really nothing stopping you from doing just about anything you want including executing the NotInList code of another cbo. Does that help?

  7. #7
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7
    I'm sorry I don't understand. When I type directly into the second combo box as soon as the number is finished the 'not on list' pops up and lets you populate the underlying table. What I was trying to do was have a number be repopulated so that you didn't have to type it in again and then when you hit enter it would go to the not on list and bring up the underlying table to save it.

    Thank you,

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Assuming the 1st cbo invokes the NotInList event then from there you can populate the 2nd cbo ControlSource or whatever is needed to eliminate the need to even go to the 2nd cbo.

  9. #9
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7
    There are two combo boxes, each one of them is bound to a separate table, Table 1 and Table 2. Each combo box has a 'not on list' so that the entry can be saved to each separate table. There are a number of occasions where the number that is populated in Table 1 is the same for Table 2 so I just want that number to pop onto the second box box window so that it can go through the not on list process and be entered into Table 2.

    Thx,

  10. #10
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    The ComboBoxed can *only* be bound to the RecordSource of the form on which they reside. Each cbo can have a different RowSource for its values but the ControlSource of each cbo can only point to a field in the RecordSource of the form, unless these ComboBoxes are on SubForms. Maybe I don't quite understand your configuration.

  11. #11
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7
    Main form is based on tbl that has both control source fields in it.

    Combo Box 1:
    Control Source is field on Main form i.e. NewNo1 and info is saved here when entered to combo box
    Row Source is table that this information is being saved to on separate table i.e. tblNewNos which is where 'Not on List' is invoked from

    Combo Box 2:
    Same as above with Control Source is field on Main form i.e. NewNo2 and infor is saved there when entered to combo box
    Row Source is table that this information is being saved to on separate tabble i.e. tblNewRNos which is where 'Not on List is invoked from

    I would like to have number that is entered on combo box 1 populated on second combo box so that 'Not on List' will invoke.

    If I try to use Default on Combo box 2 and point to:
    [Me].[NewNo1] the 'Not on List' does not happen.

  12. #12
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    As I've stated, that is one of the events that requires user activity to invoke *but* as I said, you can accomplish what is happening in the the NotInList event of the 2nd cbo from say the NotInList event of the 1st cbo.

  13. #13
    Alice is offline Novice
    Windows XP Access 2002
    Join Date
    Feb 2011
    Posts
    7
    Are you, or anyone else, able to give me any actual information on what needs to be done, what it looks like, and where it needs to go so that I can make this work.

    Thk you

  14. #14
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    How about posting what you have in the NotInList events of the 1st and 2nd cbos?

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

Similar Threads

  1. Combo box for list
    By Danzig in forum Forms
    Replies: 6
    Last Post: 11-03-2010, 05:18 PM
  2. Default value for cascading combo box
    By wwjd80 in forum Forms
    Replies: 1
    Last Post: 06-28-2010, 05:57 PM
  3. Default Value for Cascading Combo Box
    By P5C768 in forum Forms
    Replies: 3
    Last Post: 05-06-2010, 03:50 PM
  4. Simple Question - Combo Box Default Text
    By sayitgreen in forum Forms
    Replies: 3
    Last Post: 02-20-2010, 12:59 AM
  5. combo box value list
    By thewabit in forum Forms
    Replies: 13
    Last Post: 01-13-2010, 07:50 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