Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to move cursors in a browse windows from a program ?

Status
Not open for further replies.

PankX

Programmer
May 10, 2002
29
0
0
ID
xxx yyy zzz
1 2 3
4 5 6
7 8 9
10 11 12

I have 3 fields xxx,yyy,zzz and 4 records in a browse field xxx,yyy,zzz blah..blah..blah in window. First, the cursor is in the first record first field (1). How to move the cursors to (8) using a program ?

Thank's
Pram
 
If you know the cursor is always starting in field #1 and you want it to move to field #8, it's easy:
Code:
FOR i = 1 to 7
   KEYBOARD "{tab}"
ENDFOR
If you don't know where the cursor is starting from:
Code:
DO CASE
   CASE VARREAD() == "Xxx"
      FOR i = 1 to 7
         KEYBOARD "{tab}"
      ENDFOR
   CASE VARREAD() == "Yyy"
      FOR i = 1 to 6
         KEYBOARD "{tab}"
      ENDFOR
   CASE VARREAD() == "Zzz"
      FOR 1 = 1 to 5
         KEYBOARD "{tab}"
      ENDFOR
ENDCASE
It ain't elegant, but it works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top