[AccessD] Recording field changes

David Emerson davide at dalyn.co.nz
Mon Jul 12 18:10:20 CDT 2004


Thanks Gustav.  David

At 12/07/2004, you wrote:
>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.
>
>--
>_______________________________________________
>AccessD mailing list
>AccessD at databaseadvisors.com
>http://databaseadvisors.com/mailman/listinfo/accessd
>Website: http://www.databaseadvisors.com




More information about the AccessD mailing list