By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,557 Members | 1,416 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,557 IT Pros & Developers. It's quick & easy.

Updating multiple field automatically

P: 1
Hi there...

This is my first time asking the question here so bear with me...

I have two tables..
1. Products
2. OrderDetails

The fields in Products are as follows

1. ProductID
2. Product Name
3. unit Price
4. BuyDate
5. SellDate


The fields in OrderDetails are as follows:

1.ProductID
2.Quantity
3.UnitPrice
4.Subtotal
5.BuyDate
6.SellDate
7.OrderDetailsID - Primary
8. OrderID

I want to have the order details form to lookup the values from product table i.e. field 2 - 5. Ive used the dlookup but in the form only the unit price appears but buydate and selldate does not..
the dlookup function is from macro..the code are as follows


DLookUp("UnitPrice","Products","ProductID = " & [ProductID])


any ideas?
Mar 13 '07 #1
Share this Question
Share on Google+
2 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
Hi there...

This is my first time asking the question here so bear with me...

I have two tables..
1. Products
2. OrderDetails

The fields in Products are as follows

1. ProductID
2. Product Name
3. unit Price
4. BuyDate
5. SellDate


The fields in OrderDetails are as follows:

1.ProductID
2.Quantity
3.UnitPrice
4.Subtotal
5.BuyDate
6.SellDate
7.OrderDetailsID - Primary
8. OrderID

I want to have the order details form to lookup the values from product table i.e. field 2 - 5. Ive used the dlookup but in the form only the unit price appears but buydate and selldate does not..
the dlookup function is from macro..the code are as follows


DLookUp("UnitPrice","Products","ProductID = " & [ProductID])


any ideas?
You would have to do a DLookup for each value. How do you want it displayed on the form?
Mar 13 '07 #2

NeoPa
Expert Mod 15k+
P: 31,441
You need to revisit your table layout.
BuyDate & SellDate should not be fields in the Product table.
Mar 15 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.