Combo Box additions

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using a combo box in table design because I am using the field on more than 1 form. I have the "limit to list" set to Yes in the table. On the Form, I would like to add a new value typed by the user into the combo box to the underlying table combo control. I know I have to do a "Not in List" Event, but that is where my knowledge ends. What do I put in the event procedure, and anywhere else, to update the control in the table?
Thanks for your help.
 
The code I wrote for the NotInList eventHandler adheres to
the following
1- Output a message box asking the user to confirm that
they wish to proceed with the new data.

2- If they do not, execute the combo box's Undo method and
set Response to acDataErrContinue.

3- If they do, either open another form in dialog mode
should other information be needed for the underlying table
or execute a simple SQL Insert statement to add the data.
Either way, set Response to acDataErrAdded.

Hope This Helps
Gerald Stanley MCSD
-----Original Message-----
I am using a combo box in table design because I am using
the field on more than 1 form. I have the "limit to list"
set to Yes in the table. On the Form, I would like to add
a new value typed by the user into the combo box to the
underlying table combo control. I know I have to do a "Not
in List" Event, but that is where my knowledge ends. What
do I put in the event procedure, and anywhere else, to
update the control in the table?
 
That gets me started. Now, no other data is required so I am opting for the SQL, but I think I am lost on how to execute a SQL statement. I need to insert the value into a field in a table that I have defined as a Combo Box in the table itself. I tried to use another thread to help with it, but think I need another perspective. Can you send an example of the code perhaps?
 
I am good until part 3. Since I want to update a Combo Field within a table and no other info is required, I am opting for the SQL insert. But, I tried to use info on another thread to work this out, but I think I need another perspective. Perhaps could you send sample code or something of that sort?
 
Back
Top