Results 1 to 3 of 3
  1. #1
    thedao
    Guest

    Query Results in a report (Access 200)

    How do I report the tabular results of a query as a single line of text, word wrapped and deliniated by a comma in Access 2000.

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Query Results in a report (Access 200)

    What do you want ?
    One line for all the records ?
    I don't think it is possible.
    Or one line for all the fields of one record?
    Set one textbox on your report, page width and set the can grow property to yes.
    Set the control source of the textbox to :
    =field1 & ", " & field2 & ", " & field3 & ", " & field4 ......
    untill you have all your fields.

    Hope this help

    Francois
    Francois

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Query Results in a report (Access 200)

    ADO can return a recordset as a string:

    Dim strMyData As String, strColumnDelimiter As String, strRowDelimiter As String
    strMyData = RecordSetObject.GetString(,,strColumnDelimiter,str RowDelimiter)

    The default column delimiter is a tab character, and the default row delimiter is a carriage return. You can change these to suit your needs. I think you would need to write a little VBA Function to use ADO in your database, but that I couldn't say for sure.

Posting Permissions

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