Return a value entered in a sub form field to a field in main form

D

DustyD76

I have a Form with the field "Price" and a sub form with the field "Price"

what I need is a way for Access to look through the Subform and find the last
time a price was input for a product (prices are only inputed when a change
is made to the price so several record could be entered between a price
change)

The idea behind the main form price field is to display the current price of
the product and once a price is changed in the sub form the price in the main
form is updated automatically. I hope this helps you understand. Thanks for
any help.

Dusty
 
D

DustyD76

Example.

Main Form has "product" and "data about product" & "Price"

Sub Form contains Orders shipped, recieved, damaged, ect. basically tracks
everything including price changes.

Now Think of the price field being used very rarely in the middle of all
those entry's

during this time the price has changed 3 times

I need to be able to show you the most recent price (whether higher or lower
it doesn't matter). Thanks
 
K

KARL DEWEY

Is there a datetime associated with price listed in subform so as to know
which is the latest?
If so then try using DLookup.
 
D

DustyD76 via AccessMonster.com

KARL said:
Is there a datetime associated with price listed in subform so as to know
which is the latest?
If so then try using DLookup.
[quoted text clipped - 10 lines]
I need to be able to show you the most recent price (whether higher or lower
it doesn't matter). Thanks


There is a date field - however prices are subject to change more than once
on a date. it's rare but possible
 
K

KARL DEWEY

If you add an autonumber field you can include that in the DLookup.
--
Build a little, test a little.


DustyD76 via AccessMonster.com said:
KARL said:
Is there a datetime associated with price listed in subform so as to know
which is the latest?
If so then try using DLookup.
[quoted text clipped - 10 lines]
I need to be able to show you the most recent price (whether higher or lower
it doesn't matter). Thanks


There is a date field - however prices are subject to change more than once
on a date. it's rare but possible
 
D

DustyD76 via AccessMonster.com

KARL said:
If you add an autonumber field you can include that in the DLookup.[quoted text clipped - 7 lines]
There is a date field - however prices are subject to change more than once
on a date. it's rare but possible
I figured out a way to do this.

I built queries that run off each other and then list the results as unbound
text on the main form.
 

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