Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can't assign the controlsource of a grid column anymore
Message
From
03/09/1998 16:14:32
 
 
To
03/09/1998 16:04:15
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00132988
Message ID:
00132996
Views:
13
>Code in the Activate() event of my page frame:
>
>WITH THISFORM.pgfValid.pagListe.grdListe
>   .RecordSource = "TempListe"
>   .colListe.ControlSource = "TempListe.cLiNom"
>   .colDate.ControlSource = "TempListe.dAppel"
>   .colTel.ControlSource = "TempListe.cTel"
>   .colPrenom.ControlSource = "TempListe.cCustomerName"
>   .colRespCode.ControlSource = "TempListe.cCodeRep"
>   .colAgentNb.ControlSource = "TempListe.cNoAgent"
>ENDWITH
>
>This was working fine until I deleted 2 columns from my grid (not appearing in the code above).
>
>Now, whenever the Activate() event fire, I get the message "Unknown member COLLISTE". I get this error message for each of the 6 columns of the grid.
>
>In the debugger, I can see that the name I gave for the columns have been replaced by Column1, Column2, etc. They still appear with the correct name when I open the form (colListe, colDate, etc.)
>
>I even recreated the grid from scratch, but to no avail.
>
>TIA

I guess that TempListe is a cursor and there is some precaution you may take in this situation: any time you rebuild the cursor running SELECT, disconnect grid from cursor before SELECT by setting RecordSource="". For some reason grids don't like to be bothered too much from Activate events.
Edward Pikman
Independent Consultant
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform