Retrieving the First Delivery Date record onto an Order Header Form

G

Guest

I need to be able to display the first actual delivery date (of several
deliveries over several days) on an Order Header Form and write this value
to the Order Header Table.

The underlying tables consist of an Order Header Table and a Detailed
Deliveries Table.

On the Order Header Form (which is based on the Order Header Table), I have
tried using the DMin function (as I need the minimum/first date) as a
calulation within the control - as follows:

=DMin("[delivery date]","Detailed Deliveries Table","[order
number]=forms![Order Header Form]![order number]")

I have also tried a DMin expression in a macro invoked from a control on the
form as follows:

=(DMin("([delivery date])","Detailed Deliveries Table","[order
number]=forms![Order Header Form]![order number]"))

Both of the above are unsuccessful.

I have a 'top values' query in ascending order which is set to return 1
delivery date record and this does display the correct data. How can I
invoke this query from within the Order Header Form and base it on the order
number without having to reply to a prompt for the order number or invoke a
command button?

Thanks

Andrew
 

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