Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Matching Code
Message
From
30/03/2021 10:54:53
 
 
To
30/03/2021 10:30:22
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01679350
Message ID:
01679356
Views:
46
And where is the 'set step on'? Before the 'Do Case' or within the 'CASE ALLTRIM(This.parent.parent.Page1.txt_UserName1.Value) NOT EQUAL TO ALLTRIM(This.parent.parent.Page1.txt_UserName2.Value)'?

And this code is in the Click method of the Validation button, yes?

The reason I'm trying to nail this down is that the right hand side of the comparison drives the comparison. Try this from your command window
  s = 'this'
  y = ''

  ?s = y  returns .T.
  ?s <> y returns .F.
Better would be to have your first CASE statement something like
CASE empty(ALLTRIM(This.parent.parent.Page1.txt_UserName1.Value)) or 
  empty (CASE ALLTRIM(This.parent.parent.Page1.txt_UserName2.Value))
  =MESSAGEBOX("UserName cannot be empty. Please enter UserName", 16)
then check for equality.


>Forgive me, do you mean s set step on ? If that's your meaning, then yes I have placed it in there. Doesn't fire off..
>
>I'm assuming that you've hung a breakpoint on the "Do Case"...?
>
>>Greetings all,
>>
>>I am running a validation code that checks user name text box value to see if it matches their double-entry value. The text boxes are on Page 1 of 3 pageframe. Screen syntax goes as:
>>
>>Step 2. Enter your User Name , step 2a. Re-enter your user name
>>
>>The Validation button sits on page 3 of the pageframe. Here's the validation code:
>>Do Case
>> CASE ALLTRIM(This.parent.parent.Page1.txt_UserName1.Value) NOT EQUAL TO ALLTRIM(This.parent.parent.Page1.txt_UserName2.Value)
>>...notify user that the entries do not match
>> EndCase
>>
>>Testing scenario: When I enter a user name is UserName1 text box, and leave Username2 textbox empty, the validation code DOES NOT fire off. I have tried use both NOT EQUAL TO operator(s)
>>
>>Any ideas ?
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Reply
Map
View

Click here to load this message in the networking platform