4 #Error Lines in a Query

B

Bob Vance

I have a query that will show any HorseID that does not have a ClientName
but for some reason it has 4 records showing with #Error in ClientName, any
Ideas how this can happen and how do I clear them?

SELECT IIf(IsNull([HorseName]) Or [HorseName]='',[FatherName] & '--' &
[MotherName] & ' -- ' & funCalcAge(Format('01-Aug-' &
[DateOfBirth],'dd/mmm/yyyy'),Format(Now(),'dd/mmm/yyyy'),1) & ' -- ' &
[Sex],[HorseName]) AS ClientName, tblHorseInfo.FatherName,
tblHorseInfo.MotherName, tblHorseInfo.Sex, tblHorseInfo.DateOfBirth,
tblHorseInfo.HorseID
FROM tblHorseInfo LEFT JOIN tblHorseDetails ON tblHorseInfo.HorseID =
tblHorseDetails.HorseID
WHERE (((tblHorseDetails.HorseID) Is Null));
 
B

Bob Vance

Oops found it 4 balnk records in my Table , I have set the primary key to
something else, Could I set HorseName(Text) to Is Not
Null?............Regards Bob
 
D

Daryl S

Bob -

Could the #ERROR come from the funCalcAge function if the [DateOfBirth] was
null?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top