A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Error - possible Reference Library omission?



 
 
Thread Tools Display Modes
  #1  
Old October 10th, 2007, 11:33 PM posted to microsoft.public.access.queries
JASelep
external usenet poster
 
Posts: 27
Default #Error - possible Reference Library omission?

I'm comparing MyGroup with the few in RtrnNotice
to identify who (in MyGroup) still needs to "return Notice"
I've tried the below several ways but if there is a match I'm fine (VarType 8)
when there isn't a match (that's who I'm looking for) I get #Error

SELECT IIf([OrgNo]=[OrgID],"*",Null) AS Expr1, IIf(IsError([OrgID]),"","*")
AS Expr2, MyGroup.OrgNo, VarType([OrgID]) AS Expr3
FROM MyGroup LEFT JOIN RtrnNotice ON MyGroup.OrgNo = RtrnNotice.OrgID;

This is new location / new computer setup / I may be missing a DLL or
reference Library but which one???

I know you can select no matches I've done it before but on this system it
has issues evaluating that logic

--
Jim
  #2  
Old October 11th, 2007, 02:20 AM posted to microsoft.public.access.queries
Allen Browne
external usenet poster
 
Posts: 11,706
Default #Error - possible Reference Library omission?

If you did have a problem with library references, it could affect the query
since it does make function calles: IsError() and VarType().

The best approach might be to avoid those function calls. Instead use a
WHERE clause to ask for the record where the key field on the outer side of
the join is null.

There's an unmatched query wizard to do this if you wish. He's in the first
dialog when you start creating a query.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"JASelep" wrote in message
...
I'm comparing MyGroup with the few in RtrnNotice
to identify who (in MyGroup) still needs to "return Notice"
I've tried the below several ways but if there is a match I'm fine
(VarType 8)
when there isn't a match (that's who I'm looking for) I get #Error

SELECT IIf([OrgNo]=[OrgID],"*",Null) AS Expr1,
IIf(IsError([OrgID]),"","*")
AS Expr2, MyGroup.OrgNo, VarType([OrgID]) AS Expr3
FROM MyGroup LEFT JOIN RtrnNotice ON MyGroup.OrgNo = RtrnNotice.OrgID;

This is new location / new computer setup / I may be missing a DLL or
reference Library but which one???

I know you can select no matches I've done it before but on this system it
has issues evaluating that logic

--
Jim


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.