Gustav Brock
gustav at cactus.dk
Tue Oct 19 04:05:23 CDT 2004
Hi Donald and Susan It's an old and persistent rumour that DLookup is always slow. Quite often it is not. So, Susan, give it a try - it's extremely simple and in a minute your problem will be solved and you can move on to the more funny tasks. By the way, the code could be simplified even further: strCriteria ="[QAFName]='" & Me![UsersName] & "'" If IsNull(Dlookup("[ProjectID]", "tblProjects", strCriteria)) Then MsgBox "You are not the QA on any projects." Else ' Open form ... End If /gustav > Well, I don't have to worry much about portability issues, but I'd be > interested in the opinions of folks better versed than I in the area of > optimization. I was under the impression that a simple one-time call to > a domain function in a case like this is no big deal in terms of speed. > (I suppose it depends on the size of the table.) I do avoid using them > in iterative processes, however.