Code Comments
Programming Forum and web based access to our favorite programming groups.Hi... I'm using 5.5 and would like to know the simplest way to automatically advance to the next field once the data is entered in the currect field. I assume it cannot be done in all cases (or can it?) in which case, once entered I would hit Tab or Enter to advance to the next field. However, lets say it's a phone number, zip code, etc. where the exact number of characters and/or numerals are entered - I would like it to automatically advance to the next field for entry without having to use Tab or Enter. Thank you.. Rick
Post Follow-up to this messageHi Phil,
Thanks for your response and what you said makes sense so I'll scrap
that idea.
However, since I'm still learning Clarion (I'm not a programmer) -
I read up on the "Immediate" in Help - followed it the best I could -
but still got 2 errors, so I'm hoping maybe you can point me in the
right direction.
The code I used was:
UPDATE(?Cli:FileNumber)
Str" = Cli:FileNumber
IF LEN(CLIP(Str") = 6 AND KEYCODE() <> MouseLeft
SELECT(?+1)
END!IF
----------------------------------------------------------------------------
and I recieved 2 errors: The first (The line with astericks)
UPDATE(?Cli:FileNumber)
Str" = Cli:FileNumber
IF LEN(CLIP(Str") = 6 AND KEYCODE() <> MouseLeft
SELECT(?+1)
END!IF
END
ReturnValue = PARENT.TakeNewSelection()
RETURN ReturnValue
END ********* MAKE ERROR: EXPECTED: <STATEMENT>
<EOF> etc.
ReturnValue = Level:Fatal
RETURN ReturnValue
----------------------------------------------------------------------------
-
and the 2nd error was after Mouseleft (where I put the astericks) abd
the actual error is below that line
UPDATE(?Cli:FileNumber)
Str" = Cli:FileNumber
IF LEN(CLIP(Str") = 6 AND KEYCODE() <> MouseLeft ***********
Make error:Expected: <Operator> ( ) [ , &= { @ .
SELECT(?+1)
END!IF
----------------------------------------------------------------------------
----
I know it's probably something very stupid I'm doing (or not doing)
, but though I love using Clarion for simple databases using Wizards
and generators, not having a clue about Clarion Language and coding
makes it quite diffcult to do something other than just the basic
stuff. I read all the help screesn, books, etc., but it's mainly gr
to me.
Any help you can offer would be grealy appreciated..
Thanks..
Rick
"Phil Lancaster" <phil_lancaster@hotmail.com> wrote in message news:<Nyt%b.77726$Wa.63136@n
ews-server.bigpond.net.au>...
> Look up 'Immediate' in the on-line help. It will tell you all about what y
ou
> have to do.
>
> However, it's generally regarded as NOT a good thing to do. This is becaus
e
> people doing data entry get into a habit. It's much less error prone to hi
t
> Tab after EVERY field. If thet hit Tab after some but not others, the chan
ce
> is high they'll hit Tab when they shouldn't and accidentally skip a field.
> If they're a good data entry operatot, they won't be looking at the screen
> and so may not notice until well down the track, or not at all.
>
> "Rick" <Nightcheck@aol.com> wrote in message
> news:e87e0961.0402251147.3ff9dc90@posting.google.com...
Post Follow-up to this messageLook up 'Immediate' in the on-line help. It will tell you all about what you have to do. However, it's generally regarded as NOT a good thing to do. This is because people doing data entry get into a habit. It's much less error prone to hit Tab after EVERY field. If thet hit Tab after some but not others, the chance is high they'll hit Tab when they shouldn't and accidentally skip a field. If they're a good data entry operatot, they won't be looking at the screen and so may not notice until well down the track, or not at all. "Rick" <Nightcheck@aol.com> wrote in message news:e87e0961.0402251147.3ff9dc90@posting.google.com... > Hi... > I'm using 5.5 and would like to know the simplest way to > automatically advance to the next field once the data is entered in > the currect field. I assume it cannot be done in all cases (or can > it?) in which case, once entered I would hit Tab or Enter to advance > to the next field. > However, lets say it's a phone number, zip code, etc. where the > exact number of characters and/or numerals are entered - I would like > it to automatically advance to the next field for entry without having > to use Tab or Enter. > > Thank you.. > Rick
Post Follow-up to this messageHi Rick,
There's at least 1 error, possibly 2, in your code that could cause the
problem. The first is a missing right bracket. It should be LEN(CLIP(Str"))
and yes, the error IS in the Clarion example!
The second one. I can't really tell from the code because they look exactly
the same but in your Str", the " may be two single quotes. It should be a
double quote which when used as a terminator declares an implicit string
variable.
Sorry for the reply delay. I'm in Australia, so a different time zone. It's
Saturday night here. Yeah I know - get a life, eh?
"Rick" <Nightcheck@aol.com> wrote in message
news:e87e0961.0402271047.719decff@posting.google.com...
> Hi Phil,
> Thanks for your response and what you said makes sense so I'll scrap
> that idea.
> However, since I'm still learning Clarion (I'm not a programmer) -
> I read up on the "Immediate" in Help - followed it the best I could -
> but still got 2 errors, so I'm hoping maybe you can point me in the
> right direction.
>
> The code I used was:
>
> UPDATE(?Cli:FileNumber)
> Str" = Cli:FileNumber
> IF LEN(CLIP(Str") = 6 AND KEYCODE() <> MouseLeft
> SELECT(?+1)
> END!IF
> --------------------------------------------------------------------------
--
> and I recieved 2 errors: The first (The line with astericks)
>
> UPDATE(?Cli:FileNumber)
>
> Str" = Cli:FileNumber
>
> IF LEN(CLIP(Str") = 6 AND KEYCODE() <> MouseLeft
>
> SELECT(?+1)
>
> END!IF
>
> END
> ReturnValue = PARENT.TakeNewSelection()
> RETURN ReturnValue
> END ********* MAKE ERROR: EXPECTED: <STATEMENT>
> <EOF> etc.
> ReturnValue = Level:Fatal
> RETURN ReturnValue
>
> --------------------------------------------------------------------------
---
> and the 2nd error was after Mouseleft (where I put the astericks) abd
> the actual error is below that line
>
> UPDATE(?Cli:FileNumber)
>
> Str" = Cli:FileNumber
>
> IF LEN(CLIP(Str") = 6 AND KEYCODE() <> MouseLeft ***********
> Make error:Expected: <Operator> ( ) [ , &= { @ .
>
> SELECT(?+1)
>
> END!IF
> --------------------------------------------------------------------------
------
> I know it's probably something very stupid I'm doing (or not doing)
> , but though I love using Clarion for simple databases using Wizards
> and generators, not having a clue about Clarion Language and coding
> makes it quite diffcult to do something other than just the basic
> stuff. I read all the help screesn, books, etc., but it's mainly gr
> to me.
>
> Any help you can offer would be grealy appreciated..
> Thanks..
> Rick
>
>
>
> "Phil Lancaster" <phil_lancaster@hotmail.com> wrote in message
news:<Nyt%b.77726$Wa.63136@news-server.bigpond.net.au>...
you
because
hit
chance
field.
screen
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.