Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I abort a form from the Init method?
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01286760
Message ID:
01286780
Views:
23
Naomi,

Thanks for your lightening response.

But, that didn't work.

In order for this form to work, it needs data from another table. The incoming parameter is a value that is used in an INDEXSEEK command to see if there is any data. If that returns false, I use MessageBox to report the problem, and then RETURN .F.

But, the form comes up anyway.

Here's the code at the beginning of my Init method
PARAMETERS nProjectID
LOCAL nGrpCount

DODEFAULT(nProjectID)
nResult = INDEXSEEK(nProjectID, .T., 'Projects', 'ProjectID')
IF NOT nResult
	ASSERT nResult MESSAGE 'Project not found in Projects table'
	RETURN .F.
ENDIF
What am I doing wrong here.

Again thanks for your help.

Jim
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform