Results 1 to 6 of 6

Thread: Redoing tables

  1. #1
    Telsa
    Guest

    Redoing tables

    I need to temporarily create a table/query that I can use to populate a Word template. The problem I'm having is I need to combine all the data in one field from all the records based on certain criteria. For instance:

    Prod Project CD Lang
    sj234 Sam c1234 en
    sj234 Sam c1234 ei
    sj234 Sam c1235 en
    sj234 Sam c1235 sp

    to look like

    Prod Project CD Lang
    sj234 Sam C1234 en,ei
    sj235 Sam c1235 en,sp

    Any ideas anyone?

    Mary <img src=/S/confused.gif border=0 alt=confused width=15 height=20>

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Redoing tables

    The simplest way would be to create a query that formats the data into a single field and give it an expression label consisting of the concatenated field names. Then you could use the query as the source for creating your template. The SQL would look something like this, where tblData represents the name of the Access table that holds the data.

    SELECT [Prod] & " " & [Project] & " " & [CD] & ", " & [Lang] AS [Prod Project CD Lang] FROM tblData
    Charlotte

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Redoing tables

    I think the attached may do what you want. It would take ages to put it in to words so I thought it best to post it.

    I did the example with a module first, then realised a query would also work! So I
    Attached Files Attached Files

  4. #4
    Telsa
    Guest

    Re: Redoing tables

    Thanks Rupert! But I can't seem to open the db. Is it done in 2000 or XP?

    BTW: Did you know there is a new ST series coming out in Fall and a new movie in Winter? Rumor is Scott Bakula (of Quantum Leap fame) will be captain in the series.

    Mary [img]/forums/images/smilies/ohmy.gif[/img])

  5. #5
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    Newbury, Berkshire, England
    Posts
    712
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Redoing tables

    The attached DB was a A2000 as saved as a A97 then Zipped with WinZip. It opens OK for me.

    Anyone else have trouble opening it?

  6. #6
    Telsa
    Guest

    Re: Redoing tables

    I'm running Access 2000. Maybe you could try rezipping it unconverted. With the other one, Access keeps saying it may be corrupted.

    Mary [img]/forums/images/smilies/ohmy.gif[/img])

Posting Permissions

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