Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2009
    Posts
    35

    Unanswered: How to output specified data from a table??

    Hi, I am fairly new to Access and have a query I was wondering if anybody could answer.

    I currently have a txt file and require only relevant data. For example, I have lines

    cpntcs0835..........
    Lin01
    Lin02
    Lin03
    Lin04
    cpnlpl0835............
    Lin01
    Lin02
    cpnptc0835..........
    Lin02
    Lin04
    Cpnptp0835..........
    Lin01
    Cpnptp0835..........
    Lin04

    These are different coupons (tcs, lpl, ptp) and each line underneath relates to the coupon and shows what lines have been played for that coupon e.g. the customer has played lin01 & lin02 of cpn lpl, customer has played lin02 & lin04 of cpn type ptc etc.

    What I need is a way of running a command button (for example) that will run through the whole table and give me a count of coupon "ptp" which just have "Lin04" assigned to it. In other words how many customers have played the coupon type ptp and have played a Lin04.

    Is there a simple solution to this problem??

    Thanks

  2. #2
    Join Date
    Sep 2005
    Posts
    19
    I know you said this was a text file. Given the data structure the way it is, IMO an Access solution isn't what you want. Are you willing and is it possible to restructure the data?

  3. #3
    Join Date
    Feb 2009
    Posts
    35
    Due to the sheer volume of data, restructuring could be a problem and extremly time consuming. I could always filter the data by "ptp" within access but I would lose all the line info associated with them. Unless of course you can advise other ways??

  4. #4
    Join Date
    May 2005
    Posts
    1,191
    You can read text files quite easily with the FileSystemObject, specifically the reading mode of the OpenTextFile Method of that object.
    Me.Geek = True

Posting Permissions

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