In Xp11Ln:4 Why not add ProductXVendorT? Instead of using DLookup, why not link the ProductID and the prices in the new query using an innerjoin ProductXVendorT. As you said the Dlookup is slow... thousands of products would slow the DB down, no?
It's been a while since I recorded this class, so I have to rewatch the video to tell you for sure, but generally, if you can get it to work with a query, then definitely use a query. A "DLOOKUP" or any kind of lookup is much, much slower, so if it works for you, good catch! Did you try it? If it doesn't work, I don't remember my exact reasoning. Like I said, I recorded this several years ago. I don't have time right now to go back and rewatch it, but it could be that I wasn't thinking at the time. Sometimes I fall into the bad habit of relying on a "DLOOKUP" when a more complicated query would definitely be better. Sometimes I like to get it working first, and then I'll go back and optimize it. So, I don't know what I was thinking at the time. Give it a try, and let me know if it works.
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
Access Expert 11.