Help with fConcatChild

G

Guest

My users need line item information contained in a report to be contained on
a single line for every Order Number. They don't like the grouping function
which does essentially the same thing, but in the interest of keeping the
peace I've been trying to use the fConcatChild function from Allen Browne's
website. I'm having trouble with it, however. If my Orders table is called
[Order Entry5], and my Order Details table is called [tblOrderDetails], they
are linked by field [Order Number], and the field from [tblOrderDetails] that
I would like concatenated is called [ID], shouldn't the SQL expression be
written like this?

SELECT [Order Entry5].*, fConcatChild("tblOrderDetails","[Order
Number]","ID","Long",[Order Number]) AS SubFormValues
FROM [Order Entry5];

I'm getting a compile error in query expression
fConcatChild("tblOrderDetails","[Order Number]","ID","Long",[Order Number]).
(Error 3075)

I am using DAO 3.6. A number of other users have managed to get results
from the query, so it can't be THAT difficult. Does anyone have an idea
where I am going wrong?
 
G

Guest

Sorry I can't (don't want to) help you with the fConcatChild function. I
recommend the generic function at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.

Your query would contain a column/field like:
Concatenate("SELECT ID FROM tblOrderDetails WHERE [Order Number]=" & [Order
Number])

If [Order Number] is text then use:
Concatenate("SELECT ID FROM tblOrderDetails WHERE [Order Number]=""" &
[Order Number] & """")
 
G

Guest

Fantastic! It took some doing, but I got it to work... Pretty neat function!
--
Why are you asking me? I dont know what Im doing!

Jaybird


Duane Hookom said:
Sorry I can't (don't want to) help you with the fConcatChild function. I
recommend the generic function at
http://www.rogersaccesslibrary.com/OtherLibraries.asp#Hookom,Duane.

Your query would contain a column/field like:
Concatenate("SELECT ID FROM tblOrderDetails WHERE [Order Number]=" & [Order
Number])

If [Order Number] is text then use:
Concatenate("SELECT ID FROM tblOrderDetails WHERE [Order Number]=""" &
[Order Number] & """")

--
Duane Hookom
Microsoft Access MVP


Jaybird said:
My users need line item information contained in a report to be contained on
a single line for every Order Number. They don't like the grouping function
which does essentially the same thing, but in the interest of keeping the
peace I've been trying to use the fConcatChild function from Allen Browne's
website. I'm having trouble with it, however. If my Orders table is called
[Order Entry5], and my Order Details table is called [tblOrderDetails], they
are linked by field [Order Number], and the field from [tblOrderDetails] that
I would like concatenated is called [ID], shouldn't the SQL expression be
written like this?

SELECT [Order Entry5].*, fConcatChild("tblOrderDetails","[Order
Number]","ID","Long",[Order Number]) AS SubFormValues
FROM [Order Entry5];

I'm getting a compile error in query expression
fConcatChild("tblOrderDetails","[Order Number]","ID","Long",[Order Number]).
(Error 3075)

I am using DAO 3.6. A number of other users have managed to get results
from the query, so it can't be THAT difficult. Does anyone have an idea
where I am going wrong?
 

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