Changing label caption temporarily - Event On Click

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

-- 
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200712/1

0
ppc
12/20/2007 10:34:01 AM
access.forms 6864 articles. 2 followers. Follow

2 Replies
1704 Views

Similar Articles

[PageSpeed] 30

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

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

email address is invalid
Please reply to newsgroup only.



"ppc via AccessMonster.com" wrote:

> 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
> 
> -- 
> Message posted via AccessMonster.com
> http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/200712/1
> 
> 
0
Utf
12/20/2007 4:27:00 PM
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 Fye wrote:
>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]
>> 
>> prasanna

-- 
Message posted via http://www.accessmonster.com

0
ppc
12/21/2007 3:26:57 AM
Reply:

Similar Artilces:

how to print label on the very end of excel sheet
Hi, number of rows in my excel sheet varies. How can I solve following: I want label to be printed in the very end of sheet when printed (after the last row) Thanx alekm Kind of a "rows to repeat at bottom"??? Excel doesn't support this. Can you use the Footer? File|page setup|header/footer tab alekm wrote: > > Hi, > number of rows in my excel sheet varies. > How can I solve following: > I want label to be printed in the very end of sheet when printed (after the > last row) > > Thanx > alekm -- Dave Peterson Can I make specific footer that...

Changing single column default to Upper case
Can I set the default for a single column in Excel 2000 to Upper case. I keep a lot of address information in various spreadsheets and would like to default the Post Town column to Upper case, ready to mail merge. Thankyou Graham Hi graham, Pls try this in cell B1 =upper(A1) "Graham" wrote: > Can I set the default for a single column in Excel 2000 to Upper case. I keep > a lot of address information in various spreadsheets and would like to > default the Post Town column to Upper case, ready to mail merge. > Thankyou > Graham Many Thanks Anirudh - I have been...

How do I automatically change color of value if value is > 50 in .
Hi, I want to change the color of the value when it reaches a value that is > a certain value. Use 'Conditional Formatting' on the 'Format' menu Jock W "Vichingo" wrote: > Hi, > > I want to change the color of the value when it reaches a value that is > a > certain value. conditional formatting is what you want. Menu Format>Conditional Formatting, should be straight-forward what to do. -- HTH RP (remove nothere from the email address if mailing direct) "Vichingo" <Vichingo@discussions.microsoft.com> wrote in message ...

Can anyone help? All emails are label Junk and auto in Delete Box. CAnt change
Cant go through normal email junk list to delete email names. They arent in the list but ALL emails are now labeled JUNK.. and need an option to change this ... or is it a virus or bug? thnks ...

cell reads as label but returns a value
How do you have a cell read on the spread as a lable (using the label in a drop-down list) and when selected, the cell will return a constant value? The cell might read: "Red Widget" but it would return a value of say: 257. Got any ideas on this one.... Thanks... Spydor -- spydor ------------------------------------------------------------------------ spydor's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=28438 View this thread: http://www.excelforum.com/showthread.php?threadid=480383 Hi spydor, Is this what you mean? http://hanjohn.customer....

How change the Find color?
Version: 2004 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel the light blue is so hard to see. <br> Someone said this is done with system pref/appearance. But that just changes text, not border. What can I do? thanks ...

'transfer from' changed to 'transfer to'
I suspect (as I say at the end) that this problem is due to on-line synchronization. ---- I have an brokerage (investment) account with an associated cash account. I have recently upgraded from Money 2000 to Money 2004 Premium. Normally, when you enter a Sell transaction (for stock) in the investment account, and specify the Cash account in the "Transfer To:" field for the Sell transaction, it enters the Sell transaction AND a transfer FROM <investment account> in the Cash account. After the upgrade all seemed to be in order, but today, when I opened Money, I found th...

Style font size changes
I make extensive use of Styles in laying out real estate brochures, and I sometimes find that a font will change size when a document is re-opened. For example: I often use a Style I call "Detail" which might be set to 12 point Italic Garamond. When I open a saved document (maybe 20% of the time) the Style resets itself to 10 points. I can always modify the style back to where it shoild be. The reset font always goes down in size, and most often to 10 from 11 or 12. I can't correlate it to anything else, though. Has anyone seen anything similar? Do you have a clue...

mortgage account changes
I am currently using MS Money 2004 to track mortgage payments. We just signed up for an accelerated payment plan to reduce interest charges (payments are made twice a month instead of once a month). The problem is that I can't seem to change the frequency of the payments from once a month to twice a month. I would rather not have to enter the payments manually. Can anyone help????? Update the payment frequency in Bills and Deposits. -- regards, Michael Abbaticchio MVP for Microsoft Exchange Server http://exchange.mvps.org "Debbie" <Debbie@discussions.microsoft.c...

Exchange2003 Company change name
We were just adquired by a company (mko). Right now, we have an exchange2003 server under the old company (qwe). The domain name is "qwe" and the email addresses are "@qwe.com" I will have to move everything from "qwe" to "mko" and I would like to use the same server to do that. Also, I will have to keep all the users on the old company (qwe) and forward the emails to the new one (mko). What is the best practice for it? Thanks You could just add or modify a recipient policy with the new domain name as the primary SMTP address. Nue "Manolo&quo...

Changing Template on existing Workbooks
Hi, is it possible to change template on existing Workbooks in Excel ? I have ten workbooks based on Default template and I would to apply them a new customized template created by me. I didn't find how to make this change in Excel or by VBA Excel. Does anyone know it? Thanks Once the new workbook is created from the template, there is no tie back to the template. You'll have to make the change to each of the workbooks. mi00mf wrote: > > Hi, > is it possible to change template on existing Workbooks in Excel ? > I have ten workbooks based on Default template and I...

Clicking title bar causes wizard to return IDCANCEL
I've run into a very strange problem. I have a standard MFC wizard composed of a property sheet and property pages. It's been working fine until today I noticed that if I click in its title bar (or move the window), the wizard will eventually return IDCANCEL from CPropertySheet::DoModal even though the user finished the wizard successfully by clicking on Finish on the last page. By putting various breakpoints in the code, I tracked it down to CPropertySheet::OnSysCommand, which gets called due to the title bar click. However, the first line of this function reads: m_nModalResult = I...

Event ID 2028
I have noticed a couple of these errors recently and am trying to troubleshoot however I don't know which public folder to look at - we have quite a few so I don't want to check rules on each one. The error message generates a 38 digit key as opposed to a clear name. I've tried looking at various properties of the public folders but I can't seem to find this. How can I go about finding the fodler? thanks Hi Rob, I think the address your looking at is stored as the LegacyExchangeDN. You can get this info from AD (Microsoft Exchange System Objects) using ldifde or suc...

Data labels in Chart
This is a multi-part message in MIME format. ------=_NextPart_000_000E_01C56114.8ED26340 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I have a bar chart that shows projected and actual numbers for four = quarters. I'd like to label each pair of bars with the PERCENTAGE between the = projected and actual numbers for each quarter, rather than the actual = number each bar represents. Is there a way to do this based on a formula? (As opposed to creating = text boxes and insertng them?) Thanks so much. ------=_NextPart_000_000E...

changing default folder for attachments
I am used to seeing the "my documents' folder when I'm preparing to attach a file -- new computer points to my "word" file. How do I change it? See if the information on the following page helps: http://www.slipstick.com/config/attachfolder.htm -- Jocelyn Fiorello MVP - Outlook *** Messages sent to my e-mail address will NOT be answered -- please reply only to the newsgroup to preserve the message thread. *** In news:07ce01c3bf3b$1dcdad20$a001280a@phx.gbl, JK wrote: > I am used to seeing the "my documents' folder when I'm > preparing to attac...

Click ok to MessageBox in vb.net triggers form.activate in calling form
Hey guys, We're in the process of converting a vb6 app to vb.net 2008 and are having some minor issues. One of these is that it appears that the form.activate code is fired after clicking ok to any messageboxes that we display. Is this normal? Is there any way to call a messagebox in a way that won't fire the form.activate when clicking ok? We have much of our form setup code in there which we don't want run again. Sure we can code around this with flags but I thought maybe there's a way to call the msgbox with an optional param or similar? Thanks in A...

Can I change the default zoom level of a publication
When I open a publication, it comes up at 57%; Would prefer it at 75% or 87%. is there a place to change the default? There is an add-in here: Scroll down http://ed.mvps.org/Static.aspx?=Publisher/add-ins F9 will get you to 100%. Ctrl+Mouse Wheel will scroll through different zoom levels. -- Mary Sauer http://msauer.mvps.org/ "AM" <AM@discussions.microsoft.com> wrote in message news:4036C204-B383-4DD6-BFEE-62A462365738@microsoft.com... > When I open a publication, it comes up at 57%; Would prefer it at 75% or > 87%. is there a place to change the default? ...

macro triggered by changes to cell only works if i run it twice
Hi, While developing a form with some automated elements I have come into a problem about triggering a macro when a user selects an option from a drop down cell (the drop down list is created through validation). I have previously been running the macro whenever ANY cell changes in the workbook, which was working fine. However, this started interfering with another macro I have added doing something else, so i have been trying to get my orginal macro to only run when the specific cell (F12) changes by a user selecting a dropdown option. I have tried several ways, with the ...

Changes to default tab settings in Publisher lost when closing fil
In both Publisher 2003 and 2007, when I change the default tab settings in a file, when I close and then reopen the file the tab settings I made are lost and the formatting is messed up as a result. Any ideas how I can keep the changes I make to the default tab setting? Is the original document a 2000 file? Custom tabs that you previously set in Publisher 2000 are not saved when you save a publication in Publisher 2002 or in Publisher 2003 http://support.microsoft.com/kb/891825/en-us There also was a fix in a service pack for 2003. Issues that are fixed in Publisher 2003 by Office 2003 S...

How to change font of common dialog
Hi, We have a requirement in our project to change the font of a Common dialog box. For example, we need to change the font of File open dialog, based on the parent dialog font. Any help is appreciated. Thanks & Regards, Srinivas. "Srinivasa Reddy" <srinivasa.reddy@efi.com> wrote in message news:OczeIdYUGHA.5148@TK2MSFTNGP12.phx.gbl... > Hi, > > > > We have a requirement in our project to change the font of a Common dialog > box. > > For example, we need to change the font of File open dialog, based on the > parent dialog font. >...

Change Contract Status Programmatically
Hi I create a new Contract programmatically but can unfortunately not change the Status from Draft to Active. Can someone tell me how to accomplish this? TIA Hi Walter, You would need to set the status separately. You cannot set the state immediately to draft while creating the contract. If the contract is created, then update the status using the class 'SetStateContractRequest'. See this page: http://msdn2.microsoft.com/en-us/library/aa684123.aspx Good luck, -- Ronald Lemmen - MSCRM MVP Avanade Netherlands http://ronaldlemmen.blogspot.com/ "walterd" wrote: &g...

Data Validation combo box click
I am trying to create data validation with larger text and have followed the instructions in here http://www.contextures.com/xlDataVal14.html precisely but it's not working. I'm working in Excel 2007. Is there something different I need to do?? It appears to run a macro when I click on the cell but the validation list doesn't appear. I am using a named range for my validation list but I can't imagine that would help. I don't know where to start to debug it - I'm not used to working with these sort of macros, ie I can't seem to 'step' into it ...

Stacked column, remove label if data is zero
I want to create a stack column and include in the data label, the series name and the value. Is it possible to remove the data label for zero values? Is it possible to adjust the gap at column level instead of chart level? Thanks, I forgot to mention that I want to remove the data label dinamically and not manually. Thanks "Mr.LuckyMe" wrote: > I want to create a stack column and include in the data label, the series > name and the value. Is it possible to remove the data label for zero values? > > Is it possible to adjust the gap at column level instead of cha...

Excel Charts - Value Y axis scale
Can someone tell me if there is a way to prevent the values on the axis of a chart from changing when new data is added to the series? have 3 charts on a worksheet that are linked to external data. I woul like the Y axis values to remain constant but when the external data i updated, the Y axis values change -- Message posted from http://www.ExcelForum.com Hi, Double click the axis and on the scale tab uncheck the Auto option for Min/Max values Cheers Andy yeagerr < wrote: > Can someone tell me if there is a way to prevent the values on the Y > axis of a chart from changin...

Converting Word labels to Excel Database
Hi! I have a mailing list set up as labels in Word, and I'd like to convert it into an Excel database. Is there an easier way to do so, short of copying and pasting each name from the label into the name column in Excel, each address from Word into Excel, etc.? Something along the lines of a reverse Mail Merge? If you reply, would you mind, please, copying me on my e mail at mhendersona2@yahoo.com Thanks! Mary Hi Mary i've done this previously using the following method in Word, choose Edit / Replace, click in the "find what" box and then click on More, click ...