Adding data to Combo box

Ask a Question related to Microsoft Access, Design and Development.

  1. #1

    Default Adding data to Combo box

    I've made a form with several combo boxes. If the data is not available in
    the combo box, the user can hit a commande button which will bring him to
    another form (2). This form(2) will enable the user to enter the required
    information, which will be stored in a seperate table. After entering this
    data, the user returns to the orginal form. But it seems that the new data
    is not listed in the combo box, while it's already stored within the table.
    I thought this could be solved by adding the following code to the combo
    box:

    Private Sub gvb_bk_nickname_GotFocus()
    Me.Refresh
    End Sub

    But this didn't work properly. Ok, the combobox contained the new data, but
    Access started giving alrert messages telling that alle required fields
    haven't been filled in. This is completely normal as the combox is
    appearing in the middle of the form. Is there anybody out here who has any
    idea how this can be solved. I can do it by changing all the required
    fields into non-required, but this would give a program that doesn't fulfill
    all the requirements :(
    So I should find a way to refresh / update the combobox, without checking
    the required fields on the form.

    Many thanks,

    Hendrik Taveirne
    Credit Controller
    Glaverbel SA
    Brussels
    Belgium


    Intoxification Guest

  2. Similar Questions and Discussions

    1. combo box data binding
      <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" xmlns="*"...
    2. How to display a set of data in a data grid when drivenby a combo box?
      I am trying to build a page where the user can select a syle of food (i.e. chinese, italian etc) from a combo. I would then want the relevent...
    3. Data Dynamically in Combo Box
      How to set and display data (from Database) dynamically in Combo box?
    4. DataGrid - Adding labels: and adding data to cells
      I am just getting started with flash scripting. My downfall is trying to get the dynamic output to display in flash. I tried using the list...
    5. combo box and data
      Hello, I have a form with a combo box to look up account numbers,description,route and stop. This works fine. What I need to learn is how to get...
  3. #2

    Default Adding data to Combo box

    I will assume that there is a command button "OK" or
    something similar that the user clicks in order to close
    your Form2. For our purposes we'll call it cmdOK on Form2
    and your combo box on Form1 we will call combo1 for now.
    Try this:

    Private Sub cmdOK_Click()
    Forms!Form1!combo1.Requery
    End Sub

    This will refresh this combo box's list values and allow
    the user to continue to fill out the rest of the fields.
    Hope this is what you were looking for.


    >-----Original Message-----
    >I've made a form with several combo boxes. If the data
    is not available in
    >the combo box, the user can hit a commande button which
    will bring him to
    >another form (2). This form(2) will enable the user to
    enter the required
    >information, which will be stored in a seperate table.
    After entering this
    >data, the user returns to the orginal form. But it seems
    that the new data
    >is not listed in the combo box, while it's already stored
    within the table.
    >I thought this could be solved by adding the following
    code to the combo
    >box:
    >
    >Private Sub gvb_bk_nickname_GotFocus()
    >Me.Refresh
    >End Sub
    >
    >But this didn't work properly. Ok, the combobox
    contained the new data, but
    >Access started giving alrert messages telling that alle
    required fields
    >haven't been filled in. This is completely normal as the
    combox is
    >appearing in the middle of the form. Is there anybody
    out here who has any
    >idea how this can be solved. I can do it by changing all
    the required
    >fields into non-required, but this would give a program
    that doesn't fulfill
    >all the requirements :(
    >So I should find a way to refresh / update the combobox,
    without checking
    >the required fields on the form.
    >
    >Many thanks,
    >
    >Hendrik Taveirne
    >Credit Controller
    >Glaverbel SA
    >Brussels
    >Belgium
    >
    >
    >.
    >
    jmonty Guest

  4. #3

    Default Adding data to Combo box

    You need to refresh the actual control not the form

    Jim
    >-----Original Message-----
    >I've made a form with several combo boxes. If the data
    is not available in
    >the combo box, the user can hit a commande button which
    will bring him to
    >another form (2). This form(2) will enable the user to
    enter the required
    >information, which will be stored in a seperate table.
    After entering this
    >data, the user returns to the orginal form. But it seems
    that the new data
    >is not listed in the combo box, while it's already stored
    within the table.
    >I thought this could be solved by adding the following
    code to the combo
    >box:
    >
    >Private Sub gvb_bk_nickname_GotFocus()
    >Me.Refresh
    >End Sub
    >
    >But this didn't work properly. Ok, the combobox
    contained the new data, but
    >Access started giving alrert messages telling that alle
    required fields
    >haven't been filled in. This is completely normal as the
    combox is
    >appearing in the middle of the form. Is there anybody
    out here who has any
    >idea how this can be solved. I can do it by changing all
    the required
    >fields into non-required, but this would give a program
    that doesn't fulfill
    >all the requirements :(
    >So I should find a way to refresh / update the combobox,
    without checking
    >the required fields on the form.
    >
    >Many thanks,
    >
    >Hendrik Taveirne
    >Credit Controller
    >Glaverbel SA
    >Brussels
    >Belgium
    >
    >
    >.
    >
    Jim Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139