Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Menu Shortcuts
Message
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Title:
Miscellaneous
Thread ID:
00454279
Message ID:
00454313
Views:
22
Great idea! Thank you.
Not only that it worked, but it led me to a simpler solution. If the valid returns .F. it will prevent the Save button to receive focus, and I always know the name of the save button, so I changed the menu procedure to the following:
_screen.activeform.CmdSave1.setfocus()
if _screen.activeform.activecontrol.name = 'CmdSave1'
  _screen.activeform.CmdSave1.click()
else
  =messagebox('Cannot save. The current value is invalid.')
endif
>How about calling the Valid method (if there is one) of the current control specifically from the menu option? You can check what's returned, and continue if you get back something other than .F. or 0.
Doru
Previous
Reply
Map
View

Click here to load this message in the networking platform