Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenate (i think) records into one text box 1

Status
Not open for further replies.

Moss100

Technical User
Aug 10, 2004
579
0
16
GB
Hello,

I have a continuous form called frm_Surv bound to a qry called qry_Surv with fields:

P_ID (the id field)
P_Notes (a note field)
P_Select (a yes no check box)

When a record has P_Select checked as True, I would like a txtbox in the form footer to display all P_note field values, separated by a comma.

I have looked at Allen Browns concatenate code, but this relates to a one to many structure.

Is there a fairly easy way to do this?

Thanks Mark
 
Have a look here:
faq701-4233

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Use the function faq701-4233. Your control source might look like:

Code:
=Concatenate("SELECT P_Notes FROM qry_Surv WHERE P_Select = -1")

This assumes there is no filtering on any other field.

Duane
Hook'D on Access
MS Access MVP
 
Thank you - unfortunately this is giving me the error "The Microsoft access database can not find the input table or query....."

I have copied and pasted the forms query name so not sure where to go...?

thanks mark
 
Moss100,

It's important to understand steps in basic trouble-shooting. Open a new, blank query and paste this into the SQL view:

SQL:
SELECT P_Notes FROM qry_Surv WHERE P_Select = -1

Switch to the datasheet view to see if the SQL works as expected.

Duane
Hook'D on Access
MS Access MVP
 
Thanks - went through all of it again - now A1.

Thanks big time.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top