Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
One instance works with VFP7 ! vfp6
Message
From
26/05/2004 05:37:57
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/05/2004 18:25:34
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00907127
Message ID:
00907228
Views:
14
>LOCAL x,nformcount
>nformcount=0
>
>FOR x=1 TO _SCREEN.FORMCOUNT
> IF UPPER(_SCREEN.FORMS(x).NAME)=='BFRMSORD'
> nformcount=nformcount+1
> ENDIF
> IF nformcount>1
>
> THISFORMSET.bfrmsord.HIDE()
> =ammsg('E',"Sorry the form is already available")
> ACTIVATE WINDOW bfrmsord TOP
> RETURN .F.
> ENDIF
>NEXT
>
>I am trying to allow only one instance of a formset. I placed the above code in the init of the formset. It works perfectly in VFP 7 but not in VFP6. In VFP 6 I get two of everything of the formset. Does anybody understand why? And how is it done in VFP6?
>TIA
>John

Works perfectly in 7 ??? This code lets double of every form :

IF nformcount>1

Wouldn't it be :

IF nformcount>0
if wexist('BFRMSORD')
	=ammsg('E',"Sorry the form is already available")
	ACTIVATE WINDOW bfrmsord TOP
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