MS Access update item in list box connected to a multi-value field in a table
Posted on 2012-09-20
I have a multi-value field in a table that controls the events in ordering furniture from a manufacturer through to subsequent shipping to UK and fianally delivery to the customer. The multi-field control on an 'Orders' form is displayed as a list box and each event is displayed with a check box. When the check box next to an event is checked code takes over and the check box is checked to indicate that this event has been completed. For example, if the event 'Invoice Paid By Customer' is completed the the associated check box is checked and payment recorded.
What I now need to achieve is to undo a checked list event; that is remove the check mark against an event.
The code to identify the events is as follows:
eventid = Me!Order_Status_Display.ListIndex
The 'eventid' tells me the index (from 0-14) of the checked items and allows me to 'dlookup' a table to find the textual event as follows:
stat = DLookup("returnedvalue", "lookupvalues", "searchvalue='order status' AND returnedvalueranking=" & eventid)
I then process other code accordingly.
How do I change the listbox event from checked to unchecked?