I got two forms
1)"Products And Price"
2)Invoice
In Invoice Form, I got fields ( Products , Measurements and Price)
In "Product And Price" Form, i got field ( Products, Measurement and Price)
Question:
when i choose a product and measurement in the invoice form, i want the
price to be automatically appear. The price information is dependant of the
"Products And Price" form.
In short, i want the data provided in the invoice form exactly in the
"Products And Price" Form
Any solutions? (Programmatically)
Thanks in advance
Kennykee
Allen Browne - 04 May 2005 04:15 GMT
Open the Northwind sample database.
Open the Orders Subform in design view.
Look at the event procedure for the AfterUpdate of ProductID.
The sample uses DLookup() to get the current price for the selected product
from the Products table. That's the ticket.

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
>I got two forms
> 1)"Products And Price"
[quoted text clipped - 20 lines]
>
> Kennykee
kennykee - 04 May 2005 06:57 GMT
Cannot Work!!!!!!!!!!!!!!!!!!!!!!!!
The error message is "You cancelled the previous operation"!!!!!!!!!!!!!
Any other solution?
Thanks
Kennykee
> Open the Northwind sample database.
> Open the Orders Subform in design view.
[quoted text clipped - 27 lines]
> >
> > Kennykee
Allen Browne - 04 May 2005 07:23 GMT
The error message indicates that the arguments for DLookup() are malformed.
Usually it is the 3rd one that gives the problem.
See:
Getting a value from a table: DLookup()
at:
http://allenbrowne.com/casu-07.html

Signature
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
> Cannot Work!!!!!!!!!!!!!!!!!!!!!!!!
> The error message is "You cancelled the previous operation"!!!!!!!!!!!!!
[quoted text clipped - 30 lines]
>> > In short, i want the data provided in the invoice form exactly in the
>> > "Products And Price" Form