adding text to label in access form using vba
hi
can some1 pls help i have created a form in access using vba. in that form i am adding label control, the code to add a label is as follows:
Set ctl = CreateControl(frms.Name, acLabel, acDetail, , , intDataX, intDataY)
after adding the label i need to add text on the label, how to add the text can some1 pls help
thnxs in advance
Re: adding text to label in access form using vba
Just set the Caption of your Label to the value that you want.
Code:
Label1.Caption = strText
Re: adding text to label in access form using vba
Quote:
Originally Posted by
aldowsary
Just set the Caption of your Label to the value that you want.
Code:
Label1.Caption = strText
The above code works fine ,but the caption only display when the user click the Label ,kindly drop some code to display the Label caption Automatically please
Re: adding text to label in access form using vba
That code works fine.
If it is only working when the user clicks the label then that is because you put the code in the label_click event.
In other words you told it to work that way.
If you want the text to appear under different conditions then you need to put the code in the right place to meet those conditions. Nothing really happens automatically you have to tell it what to do and we can't tell you how if we don't know what you are trying to do.
For future questions start your own thread rather than reviving one that is 9 years old
Re: adding text to label in access form using vba
Sorry to ask my question in old post ,how to start new thread ??
Re: adding text to label in access form using vba
Actually i like to create one form but the caption of the form always display only when we click on the label can any one help with some codes please