Key Pad Data Entry

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Ralph Forehand
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 42
Joined: Thu Jan 04, 2007 8:05 pm

Key Pad Data Entry

Post by Ralph Forehand » Sun Mar 22, 2009 3:20 pm

I have two simple fields, FieldA and FielldB using only 12 lines each.

I want to enter data line by line in FieldA with each data entry using the Keypad "Enter" Key to advance the cursor to the next line.

When I've made 12 entries into FieldA, I want the cursor to advance to line one FieldB.

Any help appreciated.

Mark Smith
Posts: 179
Joined: Sat Apr 08, 2006 11:08 pm
Contact:

Post by Mark Smith » Sun Mar 22, 2009 5:33 pm

in the script of fld A

Code: Select all

on enterInField
   if the number of lines in me >= 12 then
      select before fld "B"
   else
      pass enterInField
   end if
end enterInfield
Though you might want to trap returnInField, as well, so something like

Code: Select all

on enterInField
  checkReturns
end enterInField

on returnInField
  checkReturns
end returnInField

on checkReturns
   if the number of lines in me >= 12 then
      select before fld "B"
   else
     put cr after me   
   end if
end checkReturns
Best,

Mark

Ralph Forehand
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 42
Joined: Thu Jan 04, 2007 8:05 pm

Post by Ralph Forehand » Sun Mar 22, 2009 6:32 pm

Mark,

GAWD :!: :!: That was neat.

Another YEA for Revolution's simplicity.

Actually I don't need to trap the returns but thanks for your thoughtfulness.:D

THANK YOU Very Much and TAKE CARE,
Ralph

sashu100
Posts: 2
Joined: Tue Mar 31, 2009 12:51 pm

RE

Post by sashu100 » Tue Mar 31, 2009 12:53 pm

on enterInField
if the number of lines in me >= 12 then
select before fld "B"
else
pass enterInField
end if
end enterInfield

use this code to advance keyword to next line
[url=http://www.e-datapro.net]data entry india[/url]

Post Reply