I'm using Access 2000 and I have a combobox containing a 2 column list - col1 is a code which is the column bound to the combobox and col2 is just a description. The combobox itself is bound to a field in a table via a query.
There are only three rows in this combobox so it's set up in the combobox properties.
The users can change the contents of the table at any time simply by selecting a different element from the combobox.
However, such a change can have serious consequences so I've set up a Before Update event that asks the users if they really want to select another value. If they say yes then the appropriate action is taken.
My problem is that if they say no I would like the value that was originally selected to be restored.
I've tried
Me![myCombo].Undo
Me![myCombo] = myOriginalValue
Me![myCombo].Value = myOriginalValue
None of the above 3 seem to work. In fact the second two each generate a runtime error.
Any suggestions would be appreciated. Raymondo
raymondo@rossar.net
There are only three rows in this combobox so it's set up in the combobox properties.
The users can change the contents of the table at any time simply by selecting a different element from the combobox.
However, such a change can have serious consequences so I've set up a Before Update event that asks the users if they really want to select another value. If they say yes then the appropriate action is taken.
My problem is that if they say no I would like the value that was originally selected to be restored.
I've tried
Me![myCombo].Undo
Me![myCombo] = myOriginalValue
Me![myCombo].Value = myOriginalValue
None of the above 3 seem to work. In fact the second two each generate a runtime error.
Any suggestions would be appreciated. Raymondo
raymondo@rossar.net