How to add new values to a dropdown box in a form?

  • Thread starter Thread starter Albinus
  • Start date Start date
A

Albinus

Hello all,

First of all, my apologies if this has already been answered on this
newsgroup - it's such a large and complex one I couldn't really search it
all. I have looked on Microsoft's site, but to no avail.

My question is, I have a form, with a dropdown box (lookup wizard was used
to make this). If I get a new value, and want to add it manually to the
field on the form, I can do that. However, I cannot seem to get Access to
save this new value as one of the options available in the field on the
form.

There has to be a way around this, I just don't know how or where to start
(as you can tell I'm an Access newbie). I'm running Access 2000 if that
helps.


Thanking you all in advance,

Albinus.
 
A dropdown gets it's values from one of several places:
you enter the values to display when you create the
dropdown, you tie it directly to a field in a table, or
you tie it to the result of a query. If your dropdown is
based on either of the last two methods, you simply need
to enter that new value in the table that is your source.
Hope that helps.
 
Hello all,

First of all, my apologies if this has already been answered on this
newsgroup - it's such a large and complex one I couldn't really search it
all. I have looked on Microsoft's site, but to no avail.

Thanks for checking, and my sympathies! Yes, it's a fairly F asked Q,
but you'ld never know it from the Microsoft site. Even the regular
volunteers here use http://groups.google.com advanced search rather
than struggling with Microsoft's search. (It's improving... we hope).
My question is, I have a form, with a dropdown box (lookup wizard was used
to make this). If I get a new value, and want to add it manually to the
field on the form, I can do that. However, I cannot seem to get Access to
save this new value as one of the options available in the field on the
form.

The Lookup Wizard is EXTREMELY limited in its capabilities. It makes
it a bit easier to add a Combo Box control (the proper name for a
dropdown) to a Form, but that's about it.

The good news is that a) the Lookup Wizard is not essential and b)
once you have created a Combo Box control on the form, you can modify
it.

Open the Form in design view and select the combo box. View its
Properties. You can set the "Limit to List" property to TRUE in order
to prevent the user from selecting a value that is not in the list;
and also add some VBA code to the "On Not In List" event to give the
user the option of adding the value they typed. There's some good
sample code from Dev Ashish at

http://www.mvps.org/access/forms/frm0015.htm
 
Back
Top