Re: Autofilling field from previous record

From: Graeme Whelan (gwhelan5_at_bigpond.net.au)
Date: 03/23/04


Date: Tue, 23 Mar 2004 04:46:39 GMT

Have you tried going back to the table or query to which the field is
bound or updating, and setting the 'default value' property? You can
either change this for each customer as you begin the data entry, or
better yet (but beyond my limited ability) somehow have it set from a
simple lookup query which will set the default value only if it finds a
previous entry for that customer for that date (or month?)

Perhaps someone more experienced than I can describe how this latter
solution can be done - I've seen it done a few months ago, and tried to
replicate it, but without success so far.

Best of luck.

On or about 23/03/2004 04:14, DJ was seen in the vicinity and allegedly
stated:

> I need the script to duplicate a field from a previous
> record to a new record:
>
> I have the following scenario, possibly there is a better
> way to do it, but I don't know for sure:
>
> We have several thousand customers, each customer has
> equipment at their location which we service. The
> equipment has to be listed in the order in which it is
> serviced, to save time, plus have the necessary parts,
> etc., on board the trucks to service customer equipment.
> At the beginning of the month we print work orders for
> the entire month. We need to match up each work order in
> a SQL dbase with the equipment sheets I am putting in
> Access. The report is being pulled together by me in
> Crystal Reports. The reason the customer number has to
> be repeated is because the only way to put the equipment
> in the order we need to, is to number it sequentially.
> The customer number is being used as an 'anchor' field to
> keep the equipment in the proper order.
>
> Probably sounds like more work then necessary, but the
> manager insists it has to be this way - I have created an
> input form to help put the equipment and info about the
> equipment into the data table using the features in
> Access to make for rapid data entry, however, if a
> customer has 100 pieces of equipment to be serviced, it
> just doesn't make sense to retype the customer number 100
> times. The customer number field is the main sort field,
> then the order the equipment is serviced is the second
> sort field.
>
> As stupid as I might sound, I still can't figure out how
> to make this statement work in order to do what I need to
> do. Any help would be appreciated.
>
> Thanks
> DJ
>