addressing performance issues

9. There is never a good reason to use domain functions. Learn SQL.

Never say Never. Say "Hardly Ever" and reserve the "Hardly" for those limited cases in which the thing you were looking up wasn't in the table or query that you had open at the moment. AND it represents a singular I.e. non-repeating lookup, like something you might do in a Form_Open or Form_Load event but not in a Form_Current event. At which point there might be a reason to allow a domain function to creep in as a matter of ease of coding, but also because if you didn't use the domain function, you would have to open a recordset anyway (because remember I said this thing isn't in the table/query your form is bound to.)
 
As an addendum to post #21, I completely concur with Pat that a Domain function in a query is a performance issue waiting to happen. My earlier comment was oriented to form contexts.
 
As an addendum to post #21, I completely concur with Pat that a Domain function in a query is a performance issue waiting to happen. My earlier comment was oriented to form contexts.
If you read the documentation that used to come with Access, that was the design purpose of domain functions so Doc Man is absolutely correct. I don't think it ever occurred to me to use one in query!
 

Users who are viewing this thread

Back
Top Bottom