The label does not exist when the form load event is raised. Try putting the code in the init event for the label.
>I have a label caption on a form which tells me the total amount for a particular field on a table. Therefore when I run my form in the load event I have the following code:
>
>
>SET default to "C:\Foxpro Projects\Lottery\Tables\"
>LOCAL lcneil
>
>USE winnings
>
>sum ALL amount TO lcneil
>thisform.label6.Caption = str(lcneil,5,2)
>
>
>The problem is that I get an error message saying 'Unknown member label6'. I think it is something to do with when the form is loading is doesn't know the controls on the form at that point. What am I doing wrong?
>
>Many Thanks in advance
May all your weeds be wildflowers