Actually I think Tom's code would work fine. Do Mycount=d.record d.next_ Loop until d.eof
d.record shows the current record, true. But in the above example the loop will advance the file to the end, and when the loop completes d.record (an in-turn MyCount) would reflect the last record in the file. Tim > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:Talk- > [EMAIL PROTECTED] On Behalf Of Lawrence, Mitchell > Sent: Friday, August 03, 2007 10:39 AM > To: [email protected] > Subject: RE: [Talk] How to Grab DataStation Record Count > > That satisfies the "current record" he is looking for, but for the > total number of records, you will need to do a loop at the beginning of > your script to grab that information. > > I use something along the lines of the following (This sets a > starttime, minimizes the script, sets the filepath to my spreadsheet, > opens it, loops through and counts the total number of records in the > spreadsheet, resets the current record, then skips to the first > unprocessed record): > > StartTime = Now() > TaskBar = True > FilePath = "H:\My Documents\~Report Work~\FCA to MDS\FCAtoMDS.xls" > D.Open_ FilePath, ftExcel, FilePath & ".bds" > Do While D("Account Number") <> "" > RecordTotal = RecordTotal + 1 > D.Next_ > Loop > D.Record = 1 > Do While D("Account Number") <> "" > If D("Status") = "" Then > Exit Do > Else > D.Next_ > End If > Loop > > Thank you, > Mitch Lawrence > Lead Applications Analyst > Technical Support - NPR/Automation > CHRISTUS Information Management > (tm): [EMAIL PROTECTED] > > > Send a "thank you" to someone! > > -----Original Message----- > From: [EMAIL PROTECTED] [mailto:Talk- > [EMAIL PROTECTED] On Behalf Of Thom C. Blackwell > Sent: Friday, August 03, 2007 12:13 PM > To: [email protected] > Subject: RE: [Talk] How to Grab DataStation Record Count > > Greetings, > D.Record will give you want you're looking for. > Regards, > Thom > > Thom C. Blackwell > Product Manager > Boston Software Systems > (866) 653-5105 ex 807 > www.bossoft.com > > LEGAL NOTICE Unless expressly stated otherwise, this message is > confidential > and may be privileged. It is intended for the addressee(s) only. Access > to > this E-mail by anyone else is unauthorized. If you are not an > addressee, any > disclosure or copying of the contents of this E-mail or any action > taken (or > not taken) in reliance on it is unauthorized and may be unlawful. If > you are > not an addressee, please inform the sender immediately, then delete > this > message and empty from your trash. > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Chen, Scott C > Sent: Friday, August 03, 2007 1:09 PM > To: Boston WorkStation Group (E-mail) > Subject: [Talk] How to Grab DataStation Record Count > > Hi, > > I want to be able to grab the current record i'm processing and the > total > record count in the datastation. > > I tried the following D.LastRecord, but it gave me a -1. Don't > think it > is correct. > > Scott Chen > Spec-Database Development > Providence Health & Services > (503) 215-4441 > > > > > DISCLAIMER: > This message is intended for the sole use of the addressee, and may > contain > information that is privileged, confidential and exempt from disclosure > under applicable law. If you are not the addressee you are hereby > notified > that you may not use, copy, disclose, or distribute to anyone the > message or > any information contained in the message. If you have received this > message > in error, please immediately advise the sender by reply email and > delete > this message. > > > > > CONFIDENTIALITY NOTICE: This message and any included attachments are from Salinas Valley Memorial Hospital and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Salinas Valley Memorial Healthcare System's Privacy Officer in Salinas, California, U.S.A at (+1) (831) 755-0751.
