Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Forms / December 2007

Tip: Looking for answers? Try searching our database.

Changing label caption temporarily - Event On Click

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ppc - 20 Dec 2007 10:33 GMT
Hi
I am updating a table through form.In the form written a procedure for On
Click event of Label.It works fine for updation.In event proc i have put a
macro(Action : Transfer Text ) with InputBox for getting date portion of the
table name
ie.Indices Watch - BSESMLCAP-18dec07
So i am getting 18dec07 as a input.Now this input i want to put as a label
name.This change should be temporary as permanent change will alter my On
Click event procedure as i am using original caption name of the label.

regds,

prasanna
Dale Fye - 20 Dec 2007 16:27 GMT
PPC,

Labels have names and captions.  The name is what you use to reference the
control in code, the caption is what displays on the form.  So, if you want
to display

18Dec07 on the label, then you need to set its Caption property:

me.lbl_LabelName.Caption = "18Dec07"

This will not change your code so that the click event will still look like:

Public Sub lbl_LabelName_Click

HTH
Dale

Signature

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.

> Hi
> I am updating a table through form.In the form written a procedure for On
[quoted text clipped - 9 lines]
>
> prasanna
ppc - 21 Dec 2007 03:26 GMT
Dale
I am using following in the event procedure
strSQL = Me.LTP1_Label.Caption
This strSQL i am using in a query for updating a tbl where field names goes
by the label captions.
ie LTP1,LTP2,LTP3 etc.So i want to change label names dynamically according
to the date in the name of the table ie.Indices Watch - BSESMLCAP-18dec07.The
only variable in the table name is date which i am getting in a InputBox
while transferring the data from html table(Import HTML).Now i want to
extract this date in a string and use it for changing the label caption
temporarily.

prasanna

>PPC,
>
[quoted text clipped - 18 lines]
>>
>> prasanna
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.