John,
Using domain functions in queries or code loops is extremely expensive. Each row in the resultset of the query or each iteration of the loop in code will cause a separate query to run for the domain function. So, if you have a thousand records, you are running a thousand queries. The join specified by Rey allows the database engine to do the heavy lifting and it is significantly more efficient. If you never work with any recordset larger than a few hundred rows, you can get away with it but beyond that, I would not recommend it.
Thanks for all the comments. John, I was not able to get your DLookUp to work for me, and with further feedback from Pat thought it better to go with Rey's query (even though I technically ask for a Access function. Rey's query gave me the result I was hoping for. Thanks again to all of you. - Tom
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.
Open in new window
You should avoid the FieldName Date in Query1 because it will definitely cause issues