>Subject: Re: No show for Labelling on Form Loading..
>From: "Richard Burmeister" <[EMAIL PROTECTED]>
>Date: Mon, 27 Nov 2000 10:07:33 -0600

>From: "Radiosity" <[EMAIL PROTECTED]>

>> I'm trying to set some text on some labels/fields as soon
>> as the form is loaded.
>>
>> I used frmOpenEvent to set the initial values to the labels/fields :

>1. Only use labels for text that you don't intend to change and set the text
>at design time.

>2. It is not safe to do anything that draws the contents of a field before
>calling FrmDrawForm, so move RFFormInit *after* FrmDrawForm.


I find dynamically changing the values in labels during the running
the program a very useful technique, though one that has to be done
very carefully.

This has been discussed many times in the past
1) Make sure the size of the label at design time is as large as the
        largest field you are going to put into it, otherwise you stomp
        over your memory (nasty!)
2) Set the value of the label before you call FrmDrawForm() is fine.
      Get a pointer to the label with CtlGetValue(), and then do
       a StrCopy().  But don't draw it to the screen at this point
3) To change the label after the screen is drawn, you have to
        a) hide it
        b) change the value with step #2 above
        c) show it    

Roger Stringer
Marietta Systems, Inc.



-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to