Gustav Brock
gustav at cactus.dk
Mon Jul 12 02:22:17 CDT 2004
Hi David If you store the ListIndex of the old selection, you can look up the value of any column directly: ' Save index of selected row. lngListIndex = Me!cboC.ListIndex ... <do stuff> ... ' Look up value of Column(1) or row lngListIndex. strOldValue = Me!cboC.Column(1, lngListIndex) /gustav > I have finally got round to implementing Bob's code. It is working well > but I have a problem with combo boxes. In cases where there are more than > 1 columns and the first column is an ID number, I would like to show the > 2nd column value (which is what is shown on the screen as the first column > is 0cm width). > I can get the new value of the combo box with "C.Column(1)" (C is dimmed as > a control). How do I get the old value of the 2nd column though? > David > At 21/06/2004, you wrote: >>Hi David, >> >>You could play with adding a memo field to your form's record source >>called "Updates", add a textbox control to your form thats bound to >>"Updates" (you can hide this field if you like), add =AuditTrailX() as a >>function call in your form's Before Update event, then add the following >>module to your project. Wish I could remember where this came from but i >>can't. The code iterates through all the data entry controls in your >>form's controls collection, recording old and new values for only those >>fields that have changed.