Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Grid columns not an object
Message
From
22/08/2000 15:36:32
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Grid columns not an object
Miscellaneous
Thread ID:
00407935
Message ID:
00407935
Views:
54
Can anyone tell me what's wrong with the following code fragment?

local lcSQLCmd

with this.grdLookup
.recordsource = ""

lcSQLCmd = "select * from MASTCUS into cursor C_MASTCUS"
lcSQLCmd = lcSQLCmd + thisform.SQLFilter
&lcSQLCmd

.recordsource = "C_MASTCUS"
.columns[1].controlsource = "C_MASTCUS.CNAME"
.columns[2].controlsource = "C_MASTCUS.CADDR"
.columns[3].controlsource = "left(C_MASTCUS.CCITY,17)"
.columns[4].controlsource = "right(C_MASTCUS.CCITY,2)"
.columns[5].controlsource = "C_MASTCUS.CZIPCD"
.columns[6].controlsource = "round(val(C_MASTCUS.CCUST),0)"
.columns[7].controlsource = "mvPhone(C_MASTCUS.CPHONE, .T.)"
.columns[8].controlsource = "C_MASTCUS.CDBANAME"
.columns[9].controlsource = "C_MASTCUS.CLICNM"
.columns[10].controlsource = "C_MASTCUS.CMGR"
.columns[11].controlsource = "C_MASTCUS.COWNER"
endwith

When I run this code I get an error on the line .columns[10].controlsource, etc.
If I comment out .columns[10] & .columns[11], no error!
If I comment out .columns[8] & .columns[9] and renumber .columns[10] & .columns[11], TO .columns[8] & .columns[9], no error!

Any Ideas?
Mike
Next
Reply
Map
View

Click here to load this message in the networking platform