Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Required Fields?
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00017517
Message ID:
00017543
Views:
69
>>>>You can also do something like, in Lostfocus:
>>>>
>>>>if empty(field)
>>>> =messagebox('Must input value',etc)
>>>> nodefault
>>>> object.setfocus (back to field)
>>>>endif
>>>
>>>Hmm...I tried this and it worked. I tried the exact same code before without the 'nodefault' and it didn't work. Well, hey, I still say there should be some sort of 'required' attribute for controls, but this seems to work so I guess this is what I'll use. Thanks Bruce, Michael, and everyone else for their assistance!
>>>
>
>
>Ok, it does work when I include the nodefault. But, if you have nodefault you can exclude the other setfocus. So, the code looks like this:
>
>if empty(this.value)
> =messagebox('Required field')
> nodefault
>endif
>
That's a good point...I include it by habit since I may want to go somewhere else...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.
Previous
Reply
Map
View

Click here to load this message in the networking platform