Purchase Price in Form

Kelsey

Registered User.
Local time
Today, 13:06
Joined
Aug 17, 2011
Messages
18
OK, so I have a query that shows me my last purchase. This is called qryLastPurchase. Basically it shows me the price for the last time I ordered each item. I want to be able to show this value in a Purchase Order form. When you select a product that you want to buy, that price needs to either just show up as a locked number with a text box to enter new cost, or it can be in a text box that's able to be edited in case there is a change in cost.
I already have a purchase order form, but it doesn't show the cost the item was last purchased at.
Any Ideas?
 
I'm making an assumption that you have a date stamp in your purchase history table. With this in mind, you can set the criteria of the query for the date field to MAX, this will show the latest date in that field.

HTH
Guy
 
Yeah, I already have a query that does that exact thing. I want to be able to show this cost in a form.
 
Just realized I could probably use a DLookUp...
 
You know your purchasing better than I do, but my worry here would be multiple purchases on the same day with varying prices. If this doesn't occur then it probably wouldn't produce a problem, but it might not be the best way to do it. If it were me, I'd use the transaction ID to lookup the last (highest) ID# for Product X. In the event of multiple daily transactions with the same purchase date it'd make sure you were always looking at the latest. Either that, or you include a timestamp with your date.
 

Users who are viewing this thread

Back
Top Bottom