Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Codes do not work in EXE
Message
From
20/09/2005 04:28:08
Jon Neale
Bond International Software
Wootton Bassett, United Kingdom
 
 
To
20/09/2005 04:18:39
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows '98
Network:
Windows 98
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01051157
Message ID:
01051160
Views:
10
What exactly doesnt work?

>Dear Experts
>
>Following codes work fine without Exe and do not work in EXE.
>What is wrong?
>Please help
>
>IF !empty(thisform.container3.text1.value)
>	b_date=thisform.container3.text1.value
>	thisform.container3.text3.value=cdow(thisform.container3.text1.value)
>
>	y_ears=0
>	IF !EMPTY(b_date)
>		IF b_date>DATE()
>			RETURN .f.
>		ENDIF
>
>		db=DAY(b_date)
>		mb=MONTH(b_date)
>		yb=YEAR(b_date)
>
>		dd=DAY(DATE())
>		MD=MONTH(DATE())
>		yd=YEAR(DATE())
>
>		y_ears=yd-yb
>		y_ears=IIF(mb>md,y_ears-1,IIF((mb=md) .and. (db>dd),y_ears-1,y_ears))
>		m_onths=md-mb
>
>		IF db>dd
>			m_onths=m_onths-1
>		ENDIF
>		IF m_onths<0
>			m_onths=m_onths+12
>		ENDIF
>
>		d_ays=dd-db
>
>		DO CASE
>		CASE INLIST(mb,1,3,5,7,8,10,12)
>			d_calc=31
>		CASE INLIST(mb,4,6,9,11)
>			d_calc=30
>
>		CASE mb=2
>			IF MOD(yb,400)=0
>				d_calc=29
>
>			ELSE
>				IF MOD(yb,100)=0
>					d_calc=28
>				ELSE
>					IF MOD(yb,4)=0
>						d_calc=29
>					ELSE
>						d_calc=28
>					ENDIF
>				ENDIF
>			ENDIF
>		ENDCASE
>
>		IF d_ays<0
>			d_ays=d_ays+d_calc
>		ENDIF
>	ENDIF
>
>	thisform.container3.text2.value=alltrim(str(d_ays))+;
>		+alltrim("-")+alltrim(str(m_onths))+alltrim("-")+;
>		alltrim(str(y_ears))
>ENDIF
>
>THISFORM.REFRESH
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform