JimmyG
Registered User.
- Local time
- Today, 06:30
- Joined
- Aug 3, 2004
- Messages
- 37
My database contains an orders table and a customers table. Each time an order is placed a different order date is entered. I need the most recent order date to be displayed on the customers form. I originally attempted to do this using an update query but was advised to just display the most recent order date on the customer form using a DMax control, as the most recent order date will also have the highest OrderID.
I attempted this but the date returned for all customers was the most recent order date in the database, i.e. every customers date displayed the same date. I need the control to display the most recent date for each individual customer
This was what I entered into the text box
=DMax("[OrderDate]","Orders")
Could someone correct this so the text box displays the most recent order date for the specific customer?
The field containing the date is called "OrderDate" and is contained on the "Orders" form. i want the text box to be displayed on the "Customers" form.
I also need to be able to use this date in a query to return customers who haven't placed an order for over a specified number of days, will this still be possible using the Dmax method?
Thanks for any advice.
Jim
I attempted this but the date returned for all customers was the most recent order date in the database, i.e. every customers date displayed the same date. I need the control to display the most recent date for each individual customer
This was what I entered into the text box
=DMax("[OrderDate]","Orders")
Could someone correct this so the text box displays the most recent order date for the specific customer?
The field containing the date is called "OrderDate" and is contained on the "Orders" form. i want the text box to be displayed on the "Customers" form.
I also need to be able to use this date in a query to return customers who haven't placed an order for over a specified number of days, will this still be possible using the Dmax method?
Thanks for any advice.
Jim