Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Objects, collections? Big problem

Status
Not open for further replies.

phil22046

Programmer
Sep 12, 2001
154
0
0
US
My line of code that crashes is:

thisform.wkgrid.columns(thisform.wkgrid.leftcolumn).text1.lostfocus()

The error message I get is 'COLUMNS is not an object.'

I am converting this code from VFP6 to VFP8. It runs fine in VFP6

 
sorry mike, when I do that I get Column does not evaluate to an object.
 
thisform.wkgrid.columns(thisform.wkgrid.leftcolumn).text1.lostfocus()

Where (what method/form object) is this code located?

If you look at the values in the debugger, what is the value of thisform.wkgrid.leftcolumn?

What is the code in the text box's LostFocus()?

If you need to call the code from 2 places, the code should be a custom method of the form and then you can issue the command Thisform.DoSomething() from both the text box's LostFocus() and anywhere else that you need to invoke it.


Marcia G. Akins
 
1) the code is located in the BeforeRowColChange of another grid on the same form.

2) thisform.wkgrid.leftcolumn = 2.

3) the lostfocus in text1 has no code.
 
Apparently the problem lies with the value of leftcolumn. At this point in the program, the grid only has one column.

So the reference to a non-existant column is causing the problem.
 
I didn't write this code, I just have to suffer through the twists and turns of changing it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top