If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > How to output specified data from a table??

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 02-17-09, 11:00
st3ven_J st3ven_J is offline
Registered User
 
Join Date: Feb 2009
Posts: 35
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
Reply With Quote
  #2 (permalink)  
Old 02-17-09, 14:13
newblu newblu is offline
Registered User
 
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?
Reply With Quote
  #3 (permalink)  
Old 02-17-09, 14:17
st3ven_J st3ven_J is offline
Registered User
 
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??
Reply With Quote
  #4 (permalink)  
Old 02-17-09, 14:22
nckdryr nckdryr is offline
Computer Monkey
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On