Need to permanently changing a row source after running code

  • Thread starter Thread starter Melinda S
  • Start date Start date
M

Melinda S

Hello!
I have added code to a form object's Not In List event to add the item to
the row source automatically. While I'm in the form, the item is still there
to select, but when I close the form & re-enter, the new items that I just
had code add, are not there anymore & it defaults back to my original row
source entries. It is not a lookup to another table or query. Just a simple
value list.

Any help will be extremely appreciated... I'm stumped & desperately need to
wrap up this project?

Thanks to everyone!
 
Melinda said:
Hello!
I have added code to a form object's Not In List event to add the
item to the row source automatically. While I'm in the form, the
item is still there to select, but when I close the form & re-enter,
the new items that I just had code add, are not there anymore & it
defaults back to my original row source entries. It is not a lookup
to another table or query. Just a simple value list.

Any help will be extremely appreciated... I'm stumped & desperately
need to wrap up this project?

Such changes when running a form are always assumed to be temporary. Think
about every time you might have code disable a button or hide a control
based on some test. Would you want such a change to be permanent? Almost
never.

Your best bet is to move your choices into a table and then you can actually
insert your new vlaue into the table.
 
Back
Top