Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Microsoft Progress Bar SP6
Message
 
 
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00814827
Message ID:
00814837
Views:
9
Thanks Neil,

I have created the Method and you code works fine. Due to me being a novice with Foxpro how can I adapt this into my code below:
SET EXCLUSIVE off
SET DELETED ON
SET DEFAULT TO U:\Data
USE modacad
SELECT modacad

LOCAL lctotal, lcsample, lctechnical, lcseason, lcdept, lcdesigner

IF thisform.combo1.DisplayValue = 'ALL'
	lcseason = ' and ' + 'modacad.key1=""'
	ELSE
	lcseason = ' and ' + 'modacad.key1=thisform.combo1.DisplayValue'
ENDIF

IF thisform.combo2.DisplayValue = 'ALL'
	lcdept = ' and ' + 'modacad.key2=""'
	ELSE
	lcdept = ' and ' + 'modacad.key2=thisform.combo2.DisplayValue'
ENDIF

IF thisform.combo3.DisplayValue = 'ALL'
	lcdesigner = ' and ' + 'modacad.moc014=""'
	ELSE
	lcdesigner = ' and ' + 'modacad.moc014=thisform.combo3.DisplayValue'
ENDIF

COUNT FOR modacad.key4='SAMPLE' &lcseason &lcdept &lcdesigner TO lcsample
COUNT FOR modacad.key4='TECHNICAL' &lcseason &lcdept &lcdesigner TO lctechnical
COUNT FOR modacad.key4<>'ZZZZ' &lcseason &lcdept &lcdesigner TO lctotal

thisform.text1.Value = lcsample
thisform.text2.Value = lctechnical
thisform.text3.Value = lctotal
thisform.text4.Value = lctotal - (lcsample + lctechnical)
Many Thanks
Neil Lewis
IT R&D Manager
Velmore Ltd
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform