|
If View(row:=Row(), col:=1,
length:=7) = "HUB.CAM" Then
is better...the row:= is
necessary since the first default parameter in View is used in the Windows
Connection to specify the window you're reading from. We've reengineered
the View command so that if exactly the first three parameters are used then
they're assumed to be a row,col,length...so View(row, 1, 7) would also
work.
Try all this in VBA's
immediate window and see what you get. That's the easiest way to
experiment...stop your script around this area, press control G, key
?view(row,1,7) and press enter
Rich McNeil
Boston Software Systems
866 653 5105
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul Sent: Friday, February 20, 2004 2:35 AM To: [EMAIL PROTECTED] Subject: RE: [Talk] Help: Eval field & key down if not equal to value Actually
I had a flaw in my late night logic. You
don’t want to have the “loop Until View(Row(), col:=1, length:=7) =
"HUB.CAM"
“ You want to have something
like Dim FoundOne as
Boolean FoundOne =
False Do ‘ When you find one, set FoundOne
to True Loop until
FoundOne Now I’m off to
bed. Paul -----Original
Message----- I don’t
believe that you can use the Zero with a “view” like you do with a
pause. You
might want to try replacing the “0” with
row() Row() returns the
current row that the cursor is at. Your
new code would look something like this….. Pause
"@9,1"
If
View(Row(), col:=1, length:=7) = "HUB.CAM" Then
Pause "@0,26"
stable ‘ ß added this.
End If
loop Until View(Row(), col:=1,
length:=7) = "HUB.CAM"
You might want to
add some additional logic on the off chance that “HUB.CAM” is never
encountered. If any of this
looks funny, and you’d like me to explain my madness, let me know, and we can
setup a call. Now go to bed and
get some sleep! Paul -----Original
Message----- Morning! I'm trying to get my
script to evaluate a field - if the data in that field isn't equal to a certain
string, then the script should key down to the next field in the list and
evaluate it for the same string. This is what I've tried and it goes to the Else
statement each time, even when the If statement is true. Even though the field
position starts at 9,1, I'm using zero for the row because I don't know at what
position the string will read "HUB.CAM". Could that be the
problem? Pause
"@9,1"
I've also tried
While View(Row:=0,
col:=1, length:=7) <> "HUB.CAM" Any help is
appreciated.
617-665-3432 |
Title: Help: Eval field & key down if not equal to value
- [Talk] Help: Eval field & key down if not eq... Barker-Lacerda , Michelle
- RE: [Talk] Help: Eval field & key down ... Paul
- RE: [Talk] Help: Eval field & key d... Paul
- RE: [Talk] Help: Eval field & k... Rich McNeil
- RE: [Talk] Help: Eval field & key down ... Barker-Lacerda , Michelle
- RE: [Talk] Help: Eval field & key down ... Lew Hundley
- RE: [Talk] Help: Eval field & key down ... Lew Hundley
- RE: [Talk] Help: Eval field & key down ... Lew Hundley
- RE: [Talk] Help: Eval field & key down ... Mickey Sherbett
- RE: [Talk] Help: Eval field & key d... Rich McNeil
- RE: [Talk] Help: Eval field & key down ... Mickey Sherbett
- RE: [Talk] Help: Eval field & key d... Rich McNeil
- RE: [Talk] Help: Eval field & key down ... Munir . Khamis
- RE: [Talk] Help: Eval field & key down ... Mickey Sherbett
