Changing label caption temporarily - Event On Click

  • Thread starter ppc via AccessMonster.com
  • Start date
P

ppc via AccessMonster.com

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
 
D

Dale Fye

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
 
P

ppc via AccessMonster.com

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


Dale said:
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
Hi
I am updating a table through form.In the form written a procedure for On
[quoted text clipped - 9 lines]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top