-
June 28th, 2005, 09:08 AM
#1
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
-
June 28th, 2005, 12:42 PM
#2
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
-
March 16th, 2014, 11:46 PM
#3
Re: adding text to label in access form using vba
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
-
March 17th, 2014, 01:32 AM
#4
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
Always use [code][/code] tags when posting code.
-
March 17th, 2014, 02:12 AM
#5
Re: adding text to label in access form using vba
Sorry to ask my question in old post ,how to start new thread ??
-
March 17th, 2014, 04:44 AM
#6
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|