>Chèrs Rénards
>
>My forms' List pages feature a "Go To" button, that invokes a "Go To Dialogue" that allows you to enter a particular key value (whichever is the selected order of the list in the grid). This has always worked fine. Recently I've added this functionality to a second project, but I wanted the dialogue's icon to change, depending on which project it's being used in. So I added the following code in the .Init() of the dialogue
>
>
>With Thisform
> lcProjectName = UPPER( JUSTSTEM(_VFP.Projects(1).Name))
> DO CASE
> Case lcProjectName = "MPLAN"
> .Icon = FULLPATH("FacIcon.ico")
> Case lcProjectName = "FAREBASEOFFICE"
> .Icon = FULLPATH("Services.ico")
> EndCASE
> ...
>EndWith
>
>
>This I found to work OK originally but now I'm getting the error:
>
>"Line of code does not evaluate to an object"
>
>on line:
>
> lcProjectName = UPPER( JUSTSTEM(_VFP.Projects(1).Name))
>
>Both in native VFP mode and the .exe I get this message. I ran the code in debug and the lcProjectName field correctly held the value "MPLAN" and it all worked fine, without incident.
>
>What gives?
>
>'ppreciate it
>
>Terry
>
>PS I accidentally hit some key combo and my message font, and that of the buttons, and the threads, has gone into this rubbishy, semi-greeked, small font, and I can't get out of it. Any ideas?
>
>UPDATE: Never mind the PS - coming out of the UT and back in again has fixed it :-)
At runtime you don't have a project active. Instead you might base it on Application.ServerName or sys(16).
Cetin