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:[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.