I want to print, in a report, multiple records in a row seperated by commas.
Can you help,Please.
Rick Broerman
I want to print, in a report, multiple records in a row seperated by commas.
Can you help,Please.
Rick Broerman

This month, every Windows Secrets subscriber can download a one-chapter excerpt of Windows 7: The Missing Manual.Windows 7: The Missing Manual provides valuable information to help you overcome these difficulties in learning a new operating system. Subscribe today to download your free excerpt.
Attached to <post#=301,393>post 301,393</post#> you will find the code for a custom function named Concat. You can copy this code into a module. Make sure that you have a reference to the Microsoft DAO 3.6 Object Library in Tools | References...
You can use the Concat function in a query, or in the Control Source of a text box on the report. Since you haven't provided any details, I can't give more specific help.
What you sent me looks quite complicated for what I want to do. I probably didn't make myself clear. Let me try again. Attached are two reports, one the way it looks now and one the way that I would like for it to look like.
Thanks agin in advance.
I'm afraid the Concat function is just what you need, to concatenate MedicineNames from tblPatientMedications, with a where-condition based on the current DeaconessID. The control source of the text box would look like this (more or less):
<code>
=Concat("tblPatientMedications","MedicineName","De aconessID=" & [DeaconessID])
</code>
To be able to use this, you must copy the code for the Concat function into a module.
I don't understand what goes in place of "_". Also will this work with a command buttom that prints only one record?
See the attached db that I am working with.
Thanks again for the help'
Rick Broerman
The attachment didn't make it. Make sure you specify the attachment just before you click "Post it". And the attachment must be a zip file less than 100 KB in size (you can't attach .mdb files directly).
Here it is again
Rick Broerman
You hadn't even bothered to copy the code for the Concat function into your database!
See attached version. I removed tables and queries that were superfluous for this example.
HansV,
It works great. Thanks. Is there a book with these kinds of tips? If not are you going to write one? I sure hope so.
Rick Broerman
The best way to find this kind of thing is to search this and similar forums (for example UtterAccess), and the newsgroups (for example through Google Groups).