Rowsource not updating diversity dating
setting must be set to Yes and you must set Response to the appropriate constant for this event procedure to work.
Be sure to test this event thoroughly and update it with a custom error-handling routine. For better or worse, this procedure updates the list only for the current work session.
Another option is to let users add items to the control's list on the fly.
This choice is easy for users — they simply enter the item into the control's text box component. You have to program the control to accept non-list items.
A simple query retrieves the data for you, which makes the control dynamic.
If the data in the table or query changes, so does the control's list.
If you enter a new metal into one of the existing records, you'll replace the existing metal.
To create a combo box control, do the following: (Traditionally, a combo box based on data will include a primary key field as well as the descriptive text field.Handing over a bit of control, in the right circumstances, can be helpful for everyone, including you.Users don't have to wait until you manually update the list to continue their work and you aren't interrupted to update the list.Since the control is unbound, you can select any item without affecting any data. The control needs an additional step when you don't want the control to reject all non-list items.
The control lets you enter a non-list item, but when you press Enter or Tab, Access displays the error message shown in Figure B. That's what the code in Listing A does — it gives the user a choice.Private Sub cbo Metals_Not In List(New Data As String, _ Response As Integer) 'Update value list with user input. ") 'Add user input If byt Update = vb Yes Then Response = ac Data Err Added cbo Metals. Row Source _ ' & ";" & New Data 'Don't add user input Else If byt Update = vb No Then Response = ac Data Err Continue cbo Metals. If you click Yes, the code adds the non-list item, as shown in Figure D.