Query Expression Help!

  • Thread starter Thread starter Bob Vance
  • Start date Start date
ok... you'll need to create a query qryOwnerName joining HorseDetails to
OwnerData, including the HorseID, OwnerID and the OwnerName that you want
to
concatenate. I haven't tested it but try

SELECT tblHorseInfo.HorseID,
funGetHorse(0,tblHorseInfo.HorseID,False) AS Name,
fConcatChild("qryOwnerName", "HorseID", "OwnerLastName", "Long",
tblHorseInfo.HorseID)
FROM tblHorseInfo;

In a word "BRILLIANT" thanks for your perseverence on my query John I will
sleep well tonight, Regards Bob :)
 
Bob Vance said:
In a word "BRILLIANT" thanks for your perseverence on my query John I will
sleep well tonight, Regards Bob :)
Oops Sorry John,
tblHorseDetails has one other field [Invoicing. Yes/No] When it is true that
OwnerID becomes False in the query
Sorry forgot about that ...Regards Bob
 
Bob Vance said:
Bob Vance said:
In a word "BRILLIANT" thanks for your perseverence on my query John I
will sleep well tonight, Regards Bob :)
Oops Sorry John,
tblHorseDetails has one other field [Invoicing. Yes/No] When it is true
that OwnerID becomes False in the query
Sorry forgot about that ...Regards Bob
I mean False to that HorseID ,,,,Thanks Bob
 
Oops Sorry John,
tblHorseDetails has one other field [Invoicing. Yes/No] When it is true that
OwnerID becomes False in the query
Sorry forgot about that ...Regards Bob

I'm sorry, this makes no sense at all to me.

"OwnerID becomes False"?????

Perhaps you could post the SQL of the owner name query you're using and
indicate what role this Invoicing field should play.
 
John W. Vinson said:
Oops Sorry John,
tblHorseDetails has one other field [Invoicing. Yes/No] When it is true
that
OwnerID becomes False in the query
Sorry forgot about that ...Regards Bob

I'm sorry, this makes no sense at all to me.

"OwnerID becomes False"?????

Perhaps you could post the SQL of the owner name query you're using and
indicate what role this Invoicing field should play.

Thanks John, This is a query that filters Horses that "Invocing" to wether
they show on the list or Not
Regards Bob

qryHorseNameActiveNot True
SELECT tblHorseDetails.HorseID, qryHorseNameActive.Name,
qryHorseNameActive.HorseName
FROM (tblHorseDetails INNER JOIN qryHorseNameActive ON
tblHorseDetails.HorseID = qryHorseNameActive.HorseID) INNER JOIN
qryNoHolding ON qryHorseNameActive.HorseID = qryNoHolding.HorseID
GROUP BY tblHorseDetails.HorseID, qryHorseNameActive.Name,
qryHorseNameActive.HorseName
HAVING (((Count(*))<>Sum(Abs([Invoicing]))))
ORDER BY qryHorseNameActive.HorseName, qryHorseNameActive.Name;
 
John W. Vinson said:
Oops Sorry John,
tblHorseDetails has one other field [Invoicing. Yes/No] When it is true
that
OwnerID becomes False in the query
Sorry forgot about that ...Regards Bob

I'm sorry, this makes no sense at all to me.

"OwnerID becomes False"?????

Perhaps you could post the SQL of the owner name query you're using and
indicate what role this Invoicing field should play.

Thanks John, This is a query that filters Horses that "Invocing" to wether
they show on the list or Not
Regards Bob

qryHorseNameActiveNot True
SELECT tblHorseDetails.HorseID, qryHorseNameActive.Name,
qryHorseNameActive.HorseName
FROM (tblHorseDetails INNER JOIN qryHorseNameActive ON
tblHorseDetails.HorseID = qryHorseNameActive.HorseID) INNER JOIN
qryNoHolding ON qryHorseNameActive.HorseID = qryNoHolding.HorseID
GROUP BY tblHorseDetails.HorseID, qryHorseNameActive.Name,
qryHorseNameActive.HorseName
HAVING (((Count(*))<>Sum(Abs([Invoicing]))))
ORDER BY qryHorseNameActive.HorseName, qryHorseNameActive.Name;
Well, just include an appropriate criterion on the Invoicing field. I don't
know what that criterion would be since... ummm... you haven't said.
 
"> Well, just include an appropriate criterion on the Invoicing field. I
don't
know what that criterion would be since... ummm... you haven't said.

Thanks John, I brought your query into my original query and all works fine
:)
Did a False on Invoicing and took away clients with No Invoicing just
brillant thanks for all your help and valuable time
Regards Bob
 
Back
Top