Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Double if function
Message
From
06/05/2006 10:21:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/05/2006 07:26:04
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows Millenium
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01119856
Message ID:
01119865
Views:
10
>Hi,
>I have been very very frustrated for many hours trying to do this.
>
>in my form, I call HD Serialnumber which I put in a text box. if it doesn't match with the value I put in a table, a message of illegal user appears.
>
>
>select hd
>if ! empty (hd.seri) and alt(thisform.txt1.value);
>==alt(thisform.txt2.value)
>messagebox("you are legal")
>do legal.prg
>else ! empty (hd.seri) and alt(thisform.txt1.value);
>!=alt(thisform.txt2.value)
>messagebox("you are illegal")
>close all
>quit
>endif
>
>The problem is that this activation should happen only if the
>table named hd IS NOT empty. Whenever it is empty, the program named legal.prg can be run whenever wanted. When I execute the command above with the table empty, there is no reaction at all whether it is a msgbox of illegal user or vice versa. So please can anyone help me with this.The table is empty for 100 executions and after that it is filled with a value.Thank you.
>
>
>Regards
>
>Syah Nurrohman
If !Empty(hd.seri)
  If Alltrim(Thisform.txt1.Value)==Alltrim(Thisform.txt2.Value)
    Messagebox("you are legal")
    Do legal.prg
  Else
    Messagebox("you are illegal")
    Close All
    Quit
  Endif
Else
  *Whatever - do legal ?
Endif
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform