Results 1 to 10 of 10
  1. #1
    rlbroerman
    Guest

    records in a row (2003)

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

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: records in a row (2003)

    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.

  3. #3
    rlbroerman
    Guest

    Re: records in a row (2003)

    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.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: records in a row (2003)

    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.

  5. #5
    rlbroerman
    Guest

    Re: records in a row (2003)

    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

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: records in a row (2003)

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

  7. #7
    rlbroerman
    Guest

    Re: records in a row (2003)

    Here it is again
    Rick Broerman

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: records in a row (2003)

    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.

  9. #9
    rlbroerman
    Guest

    Re: records in a row (2003)

    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

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: records in a row (2003)

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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •