Query Expression Help!

B

Bob Vance

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 :)
 
B

Bob Vance

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
 
B

Bob Vance

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
 
J

John W. Vinson

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.
 
B

Bob Vance

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;
 
J

John W. Vinson

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.
 
B

Bob Vance

"> 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
 

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

Similar Threads

Create a new Table Question 10
Find Missing Records in a table 1
Query, Change Expression if True 1
Ok This one is Tuff 3
Add to a String Help 2
Field Size Dilemma 12
Can This be Done! 10
4 #Error Lines in a Query 2

Top