Insert specific record information into new record

M

Maarten

I've got a problem which I don't really know how to tackle.

I've got a table with records which I fill out via a form.
When I add a new record, I'd like some information to be filled in
automatically based upon information available in previous records.
But the expression I'm looking for has serveral instances. How do I
pick the single information I need.

Example.
I'm filling out a form that holds order information of a customer.
When I'm filling out a new for for the same customer I'd like
information like address, contactperson etc to be equal to the
information used the last time (and then eventually update
afterwards). So I have a table with
Number Name Contact Town
080218 Appel.net John New York
080211 Appel.net John Brisbane
080211 Pear.com Frank LA
080124 Appel.net John Brisbane
080115 Pear.com Pete LA

In a new record I want to select (or type) Appel.net and have the
information
080218 Appel.net John New York returned, Since new transactions are
going via NewYork rather then Brisbane.
If I select Pear.com I want 080211 Pear.com Frank LA to be returned.
Other then suggested in this example, the information is not likely to
change often.

, I was working out a code based on dLlookup but got stuck wit the
double condition (the most recent record, but only of one Name). Can
someone help?
 
G

George Nicholson

One approach:

Create a saved query that returns a single record for each customer
containing the last info used. Sort on TransDate (Descending) and this
becomes one of the few times First is a useful aggregate.

Then use CustName in a Dlookup against that query.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top