Event to match up previous entries and insert matching data

Maclain

Registered User.
Local time
Today, 21:50
Joined
Sep 30, 2008
Messages
109
Good morning all,

I've had large amounts of help on here to further develop our badly designed database :-)

The next stage I'd like to include is a match and enter pricing details. We get a lot of repeat work that is entered onto our system, due to the nature of the work we do each item is then checked individually. There is a portion of this that could be automated.

Our order intake table has an amount of information, various bits of which are supplied by various customers, but not always all of the information is required or given.

Here's what I'm after. Id like a price to be copied from a previous record where the "shots" field matches a previous entry.

The other fields that would need to be similar are the "coverage" "drawing no" "pattern no"

But only when these fields are populated, we often, but not always put a - in these fields where the information is not given. I think this may be bad practice, but it shows us the information has not been supplied, and not just missed from the order.

Drawing number and pattern number are a little strange, again the information supplied by the customer and entered on our system can be awkward to search? http://www.access-programmers.co.uk/forums/showthread.php?t=267212

To sum up, when an order is completed i'd like to have an afterupdate event that searches the previous records, where cover, drawing no / pattern no are *matching* and the shots do match, then copy the price of a matching record, where that record is within 12 months of today (using the date_rec field) and then tick an "automated_price" field so i know the price has been generated by the system.

And breathe..
 
I got lost. Can you boil this down to some essence without fluff? IF you want to copy data from a record to a new record, see http://allenbrowne.com/ser-24a.html or http://allenbrowne.com/ser-57.html

A logic requiring messing with data in a newly saved record in AfterUpdate (i.e. just after saving it!) is just not on. Go for a walk and think. If no solution emerges then take a longer walk.
 

Users who are viewing this thread

Back
Top Bottom