Hey Richard I'm having a ton of difficulty getting the DLOOKUP functions to work. Even jumping all the way back to the Expert 10 course they never worked & now that your elaborating on them I really need to get them working. My OrderF is setup exactly the same as the PCResale version, however; the OrderF DiscountRate & TaxRate boxes are being looked up depending on the CustomerID in the CustomerCombo box. The control source for DiscountRate & TaxRate refer back to their OrderT fields respectively.
The default value for DiscountRate: =DLOOKUP("DiscountRate","CustomerT","DiscountRate=" & CustomerCombo)
The default value for TaxRate: =DLOOKUP("TaxRate","CustomerT","TaxRate=" & CustomerCombo)
Both of these boxes on the OrderF have #Error in them. Neither of these boxes are sourcing text strings so my quotes should be ok as they are.
The VBA DLOOKUP for TaxRate you explained in this video also doesn't work on my OrderDetailF. All other fields such as ItemID, Description, Price1 etc copy onto the OrderDetailF except TaxRate. I've spent the past 3 nights scanning forums high & low without success. Your help would be much appreciated
Reply from Alex Hedley:
Should DiscountRate: =DLOOKUP("DiscountRate","CustomerT","DiscountRate=" & CustomerCombo) not be DiscountRate: =DLOOKUP("DiscountRate","CustomerT","CustomerID=" & CustomerCombo)
What is being stored in the bound column of the CustomerCombo. If it is CustomerID your DLOOKUP will be saying, if CustomerID = 1 DiscountRate: =DLOOKUP("DiscountRate","CustomerT","DiscountRate=1") Therefore is unlikely to work since DiscountRate is likely to be a fraction.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Microsoft Access 302.