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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Addressing Objects Within Formset

Status
Not open for further replies.

IForgot

Programmer
Mar 20, 2002
122
US
I am having a great deal of difficulty addressing objects on a formset.

When I do a "functional convert" of a FPW screen to VFP6 or 7 it creates a formset with my screen 'objects' displayed.

My problem is that when I attempt to use one of the objects VFP tells me that it does not know what I am talking about.

Example resulting from FPW to VFP conversion:
frsBrwsBOM
gcBrwsWind
PageFrame1
Page1
cmgpbDates
Command1
grdBOM
Column1
Header1
Text1
Column2
Header2
Text2

When I attempt to do something like
ThisForm.Command1.Enable = .F.
It doesn't recognize COMMAND1
OR
frsBrwsBOM.gcBrwsWind.PageFrame1.Page1.grdBOM.Column1.BackColor = RGB(255,255,0)
It doesn't recognize gcBrwsWind

Why is this happening?

The values look OK to me and they are consistent with what I see within the Form Designer properites window. But VFP does not seem agree for some reason.

Your advice and assistance would be greatly appreciated.

Thanks,
I_Forgot


 
Try:
Code:
ThisFormset.gcBrwsWind.PageFrame1.Page1.grdBOM.Column1.BackColor = RGB(255,255,0)
Rick
 
Whenever you are in doubt about how to reference an object in code...right-click wherever you are writing your code within the formset and left-click on Object List...this will bring up a list of objects that your formset contains and just left-click on the one you want to reference and you will see the proper syntax show up for you automatically. Just a little tip that might help you out in the future.

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top