Value list problem

TomBP

Registered User.
Local time
Today, 08:24
Joined
Jul 6, 2006
Messages
49
I'm making use of a value list to add firms in a column. Now I would like to try something out. Suppose there is another firm that isn'nt in the value list. I selected no for the Limit To List question.

Pic1-5.jpg


This makes it possible to type a firm in the firm column that is not in the list. I typed "CargoTex" as example.

Pic2-4.jpg


The problem I have is that "Cargotex" isn't featured in the list after I typed it in record 24. How can I make it possible that when I add a different firm to the firm column, it will be shown in the value list for the next time. A bonus feature would be that the word would be alpabethically organised within the list.
 
Hello:

You would use the "On not in list" event to handle this. Then you can programically add the selection to the list or do some other routine.
Regards
Mark
 
Besides, it will be much easier if instead of using a value list, you use a table to lookup the value. A lookup table can be easily modified with less work than with a value list.

Value list is good for short list that will never change practically forever (e.g. Gender= Male, Female). Entities such as firm name, customers, invoices type, should go to a lookup table.
 
Alternatively, set Limit to List to 'No', as you have, and add the following in the After Update event of the listbox:

[Forms]![formname]![fieldname].Requery

This will rerun the query providing the data for the field, ensuring that the value can be used straight away.
 
Where can I acces the after update event cause I can't seem to find it.

valuelistafterupdate.jpg


Is it somewhere here I have to look?
 
There are no events associated with data entry directly into tables which is why you should be using forms to enter data.
 
I have tried this:

[Forms]![formname]![fieldname].Requery

But it doesn't seem to do the trick
 

Users who are viewing this thread

Back
Top Bottom