Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old July 17th, 2007, 04:30 AM
Authorized User
 
Join Date: Jul 2006
Location: Kolkata, West Bengal, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default Need to Count number of lines in a file

Hi Friends

   i need little help


Actually i have 2 or 3 files in a folder and i want to count the number of lines present in the files and show it on screen

File path

C:\c\123PD
C:\c\123WS
C:\c\123.rpt
C:\c\45PD
C:\c\45WS
C:\c\45.rpt
I want to open them ( note : i want to open all files which has PD as extension then get the first 3 char ( may be 2 or 3 digit) of PD file , like in example it would be 123 then get all the file starting with 123 like 123WS and 123.rpt then show me the number of lines present in File ( 123PD ) and File (123WS) and (123.rpt) on screen at one time )

then i will want to referesh the database table and read next set of file which is 45

the common identifier will be there will one PD one WS file present in the path always

Screen may have output field like

File PD - Show = 123PD
Number of lines = 6783

File WS - Show = 123WS
Number of lines = 73

File rpt - show = 123.rpt
Number of lines = 78

database table would be
table 1

Key would be

Line number = number (primary key ) ( value doesnt matter )
FilePD
NumberoflinesPD
FileWS
NumberoflinesWS
Filerpt
Numberoflinesrpt

the count variables names should be different for three different files


Thanks and Regards
Lawson, COBOL
__________________
Thanks and Regards
Lawson, COBOL
Reply With Quote
  #2 (permalink)  
Old July 18th, 2007, 06:45 AM
Friend of Wrox
Points: 9,611, Level: 42
Points: 9,611, Level: 42 Points: 9,611, Level: 42 Points: 9,611, Level: 42
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Mar 2004
Location: Washington, DC, USA.
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts
Default

What kind of files are these? Are they .txt, .csv, etc?

What app is the .rpt extension for?

mmcdonal
Reply With Quote
  #3 (permalink)  
Old July 19th, 2007, 04:28 AM
Authorized User
 
Join Date: Jul 2006
Location: Kolkata, West Bengal, India.
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to lawsoncobol
Default

these are cobol files with no extensions but it can renamed to txt files , if VBA can read without extension then really it would be fine
it contains text characters


Thanks and Regards
Lawson, COBOL
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 Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
find number of lines in .txt file dgr7 Beginning VB 6 8 July 16th, 2014 05:11 AM
how to count lines in word file arshad mahmood VB How-To 2 June 7th, 2006 09:40 PM
Count the number of output lines joyces XSLT 7 July 6th, 2005 11:49 AM
How to count total number of nodes in an xml file? nimesh XSLT 1 August 12th, 2004 03:26 AM



All times are GMT -4. The time now is 04:19 AM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.