I refuse to have a battle of wits with an unarmed person.
by ShiftPoint » Thu Jul 23, 2009 1:15 pm
Quick example of what I came up with to scan through a cursor "lcCursor" and set properties for various labels.
- Code: Select all
lcScanCount = 1
SELECT (m.lcCursor)
IF RECCOUNT() > 0
SCAN
lcPropSet = "lblContact"+ALLTRIM(STR(lcScanCount))+".Visible = .T."
Thisform.&lcPropSet
lcPropSet = "lblContact"+ALLTRIM(STR(lcScanCount))+".Caption =ALLTRIM("+ m.lcCursor + [.name]+")"
Thisform.&lcPropSet
lcPropSet = "lblHome"+ALLTRIM(STR(lcScanCount))+".Visible = .T."
Thisform.&lcPropSet
lcPropSet = "lblHome"+ALLTRIM(STR(lcScanCount))+".Caption ="+ m.lcCursor + [.homephone]
Thisform.&lcPropSet
lcPropSet = "lblWork"+ALLTRIM(STR(lcScanCount))+".Visible = .T."
Thisform.&lcPropSet
lcPropSet = "lblWork"+ALLTRIM(STR(lcScanCount))+".Caption ="+ m.lcCursor + [.workphone]
Thisform.&lcPropSet
lcPropSet = "lblCell"+ALLTRIM(STR(lcScanCount))+".Visible = .T."
Thisform.&lcPropSet
lcPropSet = "lblCell"+ALLTRIM(STR(lcScanCount))+".Caption ="+ m.lcCursor + [.cellphone]
Thisform.&lcPropSet
lcPropSet = "lblRelation"+ALLTRIM(STR(lcScanCount))+".Visible = .T."
Thisform.&lcPropSet
lcPropSet = "lblRelation"+ALLTRIM(STR(lcScanCount))+".Caption ="+ m.lcCursor + [.relation]
Thisform.&lcPropSet
lcScanCount = lcScanCount + 1
IF lcScanCount > 3
EXIT
ENDIF
ENDSCAN
ENDIF
lcScanCount = 0
-

ShiftPoint
-
- Posts: 70
- Joined: Sun Jul 05, 2009 4:52 pm
- Location: Pickerington, OH
-
Return to Catch All ( FoxPro, Clipper, etc)
Who is online
Users browsing this forum: No registered users and 0 guests