Adding a value to a table from a form

J

jdembosky

I have a form with fields that pull from a table. I would like to be able to either pull a value from a list ( a combo box tied to a table - I have gotten this to work) or enter in a value that is not in the list/table. When I enter in a new value, I would like it to be added to the table, and thus be able to access it from my combo box for future entries. Is this doable?
 
V

Van T. Dinh

Check Access VB Help on the NotInList Event for the
ComboBox.

See also The Access Web article:

<http://www.mvps.org/access/forms/frm0015.htm>

HTH
Van T. Dinh
MVP (Access)


-----Original Message-----
I have a form with fields that pull from a table. I would
like to be able to either pull a value from a list ( a
combo box tied to a table - I have gotten this to work) or
enter in a value that is not in the list/table. When I
enter in a new value, I would like it to be added to the
table, and thus be able to access it from my combo box for
future entries. Is this doable?
 
J

John Vinson

I have a form with fields that pull from a table. I would like to be able to either pull a value from a list ( a combo box tied to a table - I have gotten this to work) or enter in a value that is not in the list/table. When I enter in a new value, I would like it to be added to the table, and thus be able to access it from my combo box for future entries. Is this doable?

Yes. You need some VBA code in the combo box's Not In List event to do
this. See

http://www.mvps.org/access

and search for "Not In List" for sample code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top