Control source in text box

I am using the following expression in a control source =[ClientDesignator] 
& "-" & [CatDesignator] & "-" & [FunctionDesignator] & "-" & [Version]

When I run the report the data is correct but I would like the version to 
show up as 0001 instead of 1. Is there a way to do this?


7/24/2007 8:47:25 PM
access.reports 4434 articles. 0 followers. Follow

3 Replies

Similar Articles

[PageSpeed] 6

"bobojones" <> wrote in message 
>I am using the following expression in a control source =[ClientDesignator] 
>& "-" & [CatDesignator] & "-" & [FunctionDesignator] & "-" & [Version]
> When I run the report the data is correct but I would like the version to 
> show up as 0001 instead of 1. Is there a way to do this?
> Thanks

Use the Format method:

.... & Format([Version],"0000")

Carl Rapson

7/24/2007 9:12:15 PM
Try it like this (No guarantees, of course). This assumes that the [Version]
is numeric text and not an actual number.  Actually, I just tried it both as
text and as an integer and it worked without explicitly converting the int to
text, so it ought to be fine.

 =[ClientDesignator] & "-" & [CatDesignator] & "-" & [FunctionDesignator] & "-
" & FORMAT([Version],"0000")

Watch out for word-wrap

bobojones wrote:
 =[ClientDesignator] & "-" & [CatDesignator] & "-" & [FunctionDesignator] & "-
" & [Version]
>When I run the report the data is correct but I would like the version to 
>show up as 0001 instead of 1. Is there a way to do this?

Mike Pippins

"We have met the enemy and he is us." -- Pogo Possum

Message posted via

7/24/2007 9:26:45 PM
Thanks, This works great
"Carl Rapson" <mr.mxyzptlk@newsgroups.nospam> wrote in message 
> "bobojones" <> wrote in message 
> news:%23Tv4QPjzHHA.4824@TK2MSFTNGP02.phx.gbl...
>>I am using the following expression in a control source 
>>=[ClientDesignator] & "-" & [CatDesignator] & "-" & [FunctionDesignator] & 
>>"-" & [Version]
>> When I run the report the data is correct but I would like the version to 
>> show up as 0001 instead of 1. Is there a way to do this?
>> Thanks
> Use the Format method:
> ... & Format([Version],"0000")
> Carl Rapson

7/25/2007 1:44:47 PM

Similar Artilces:

comment text box
I usually insert comments in almost every cell. When the comment text box opens it always come with my name. If I delete my name in Tools/options/general/user name, the comment text box opens with S_User instead of my name. If I change my name for , let us say, a point, the comment text box opens with ":." How can I do to make this comment text box open completely blank and without formating? TIA -- Edgard Kniriem Debra Dalgleish has provided code for this. Copy/paste the code to your workbook or Personal.xls. Assign the macro to a button and use that button to insert a comme...

Spell check on access with out message box
On form close i run spell check with the following code DoCmd.RunCommand acCmdSpelling If there is not spelling mistakes it brings up message saying 'Spell check complete' with Ok button Is there a way to make sure this message box does not apear Hi Simon, Have you tried using Set Warnings before and after? Note: Use DoCmd.SetWarnings True in the ExitProc section, so that this is executed even if an error occurs: Option Compare Database Option Explicit Private Sub Form_Close() On Error GoTo ProcError DoCmd.SetWarnings False DoCmd.RunCommand acCmdSpelling ...

Forms Record Source
Is it better to build a form based on the actual table or to build it on a query instead? No difference. If you need all the fields from the table, sorted by primary key value, just bind the form to your table. If you need only some records, or need them sorted in another way, either create a query, or use a SQL statement in the form's RecordSource. Either way, it will end up as a (hidden) saved query behind the scenes. -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - Reply to group, rather than allenbrowne at mvps...

Where is my ActiveX control Icon?
Hello guys, I just wrote an ActiveX control using VC++.Net 2002. I created an MFC ActiveX Control project. After I finished my code and compile it to .OCX file. I tried to use it on VB7.0 (.net 2002), seems no problem. However once I used it on VB6.0, then I cant see my ActiveX contorl Icon on VB Form at design time. I pasted my OnDraw method below: void CTestxCtrl::OnDraw( CDC* pdc, const CRect& rcBounds, const CRect& rcInvalid) { // TODO: Replace the following code with your own drawing code. pdc->FillRect(rcBounds, CBrush::FromHandle((HBRUSH)GetStockObject(WHITE_BRUSH))); p...

PLease help: How to activate activeX control? #2
Thanks but if I want to SetTimer in the control and the HWND is NULL, I cannot create timer event. Then, I must use visible control? Anthony >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> When a control is set to be invisible at run time it does not have a HWND internally (IE hWnd == NULL). (It does from the container programs perspective, but that is irrelevant). Take a look at the VB Common Dialog Control for an...

2 FONT Color menu boxes that can display 2 different colors independently
Hi I need help with a code that can allow 2 FONT Color menu boxes in the toolbar that can allow me to display 2 different colors at one time independently. Any help is much appreciated. Thanks. ------------------------------------------------ ~~ Message posted from ~~View and post usenet messages directly from ~~Now Available: Financial Statements.xls, a step by step guide to creating financial statements AFAIK, you can't have independent font colour buttons. You could record the steps as you apply font colour to a cell, then assi...

Dynamically load DataValidation List through Source field?
I'm using the Data, Data Validation, List option to create a dropdown list in a cell that references a range in my worksheet. However, the worksheet is very large that populates the dropdown. Is there a way to filter or dynamically populate the dropdown using a wildcard such as using a function =VLOOKUP("A*", =$J:$J, 1,False) in the Source field to populate the dropdown with just the names that start with "A". Sorta. You could setup a range of cells with formulas that only pulled certain cells, and setup a dynamic range to refer to that cell named MyRa...

How do I view complete text content in an Excel Comment box?
When scrolling over comment boxes in Excel, I can only partially view note content. Is it possible to specifiy the size of the comment box OR is there any simple method available to view complete contents of comment box while scrolling over? Right-click>Edit Comment>Drag to re-size. Or re-size all using code. Gord Dibben MS Excel MVP On Sun, 25 Apr 2010 02:41:01 -0700, Deaglan1 <> wrote: >When scrolling over comment boxes in Excel, I can only partially view note ...

Tab Control without Proprety Page?
Hi All! I need to use Tab Controls. It works in standard way, with Property Pages. But I need to resize the window in runtime with mouse, minimize and maximize window. Property Page does not this because it is derived from CDialog. How to make it? Thanks Happy New Year! You need to change its border style to "resizing border". You could subclass the CPropertySheet and modify this in the PreCreateWindow. joe On Sun, 30 Dec 2007 22:05:54 +0100, "Ivan Kossey" <> wrote: > Hi All! > >I need to use Tab Controls. It works...

Consolidating & Labels
When consolidating a bunch of data and checking "Create Links to Sourc Data," everything works fine but it includes a + or minus icon on th left to click on to see all of the values summed (added rows). Now, my question is: Is it possible to have labels on the left of al of these 40 values or so being summed (only seen when consolidated cel is expanded) and have those labels appear directly to the left of thes values from the source files? This would then make it easy to create pivotTable. Thank you -- rhelle -----------------------------------------------------------------------...

Extracting Text in a string of text
Happy Holidays to All! How do I extract a concatenated field so I have exactly what I need. I've used the Left and Right functions, but I need to extract more precisely without having to guess the number of characters. For example: New York, NY 10019 I want to extract out the "NY" or the state. How do I do that given I may have multiple city and states? Thanks for any help:confused: -- walkerdayle ------------------------------------------------------------------------ walkerdayle's Profile: View ...

Delete Duplicate Text
I have a work book inside this workbook there are 7 work sheets (one for each day). Each sheet uses columns A, B, C, D I have sheet call weekly all in formation in this sheet from the 7th everything work fine only one column it has text and there are several duplicate. Example : clinic A, clinic B, clinic A How to remove the duplicate from this column to be like this : clinic A, clinic b and so on other Questions I am using this function to get week number =WEEKNUM(C12,1) is there any way to get it work Is that possible and if so can someone please help with the formula for making thi...

Importing text files (PowerToy?)
So far, I have yet to see the capability in OneNote to import a text file into a note, or better yet a series of text files into individual notes. Anyone willing to contemplate the creation of a PowerToy for this? Or is it something in OneNote 2010 that I've so far missed seeing? //Steve// Steve Silverwood, KB6OJS Wildomar, California, USA Email: I wrote one for English at it needs to be extended for other languages, so feel free to hop in! ...

combining dates and text in a cell
Hello-- I had a column with dates and another with text labels. I'd like to combine these and tried using this formula: =D6&" "&I6 D6 = 7/4/2009 I6 = HOLIDAY Is there any way to do this to get the actual date and not the numberical value returned? Thanks in advance for your help. try =TEXT(D6,"m/d/yy ") & I6 Notice that I've included the space for separation as part of the format for the date, saving a little complexity of the formula. You can, of course, use other formats for the date to get it displayed differently, s...

Select Text with Similar Formatting is not enabled
In Word 2007, I have several instances of text formatted with small caps. I should be able to click inside one of the formatted words and from the Select menu, Select Text with Similar Formatting. However, that option is greyed out / disabled. Does anyone know why and what the fix is? Thank you! I found the answer: Keep Track of Formatting must be enabled in Word Advanced Options. "Trudy" wrote: > In Word 2007, I have several instances of text formatted with small caps. I > should be able to click inside one of the formatted words and from the Select ...

Marking text to not be spell checked? Word2010
I have somehow marked a large portion of my documents with, "Do not check spelling and grammar" HOw do I unmark it so it checks all not just some of my work? Perhaps 2007 to 2010 has done so>????? Use Ctrl+A to select everything in the document, then go to the Review tab and from the Language section of the ribbon, click on the Language pulldown and then select Set Proofing Language and uncheck the "Do not check spelling or grammar" box (You will need to click on it twice if it is a square blue box when you access that dialog) -- Hope this helps. Pl...

Repeat random numbers from a range and text
I am new at this, I need to create 2 different types of randomness, one of numbers and one of text selections. #1 a range of numbers, i.e, 134-2807 that allows repeat of numbers with a return of only 25 numbers. This random option is use daily so I need to be able to create a worksheet where each day only the range is changed, (without having to key the each number of the range to a separate row line) #2 a range of 5 process types, i.e, data, irsdat, ardat, ispdat, dsldat, where 3 processes are selected daily from the 5 listed which allows repeat of processes. I reviewed the RAND and RANDBE...

How do I change macro text with another macro?
Hello, I have a set of workbooks that all have a similar macro in them. Each of these macros contains a string I need to change, but to change it manually in each file is time prohibitive - 60+ files. Given I already have one of these files open with a seperate macro, from the seperate macro, how do I access the module - say Module1, search for the line that contains the text needing to be changed, change it and then close the file? I already have the list of files and the loop to go through all of them. I am just unclear on how to change the Module1/Macro text from another macro. Any ide...

If or something else for Partial Text Extraction/Reference
Hi there, I have a group of companies : ABC Corp. XYZ Insurance EFG Ltd. OPQ Private Ltd. LMN Insurance IJK Corp. I want to put a function the column in front of this list. This colum would have to say "INS" in case it finds the "word" INSURANCE in thi list. "CORP" if it finds "Corp." and so forth. Can anyone assist? Thank you Sac -- Message posted from Hi try something like =IF(ISNUMBER(Find("Corp",B1)),"Corp",IF(ISNUMBER(FIND ("Ins",B1)),"Ins","Other")) >-----Origin...

changing cell value makes the formula plain text
I have a working formula: =COUNTIFS(E3:E74,"In Progress",F4:F74,A97)+COUNTIFS(E4:E74,"Not Done",F4:F74,A97) BUT when I change something like E3, to E4, the formula appears simply as plain text. Any ideas? Stergios The row references should be same for all conditions. 4 to 74 ... as below...You dont need to repeat countifs() instead you can try the below version. =SUM(COUNTIFS(E4:E74,{"In Progress","Not Done"},F4:F74,A97)) -- Jacob "spandon" wrote: > I have a working formula: > > =COUNTIFS(E3:E74,...

Button Text not showing :Too many items in Oppurtunity Menubar
Hi, It is indeed necessary for me to display the Text for all the buttons. But, there exist a lot many and CRM is hiding the text. How can i tackle this? How can MenuITem be useful (if at all.)? Thanks. Submitted via EggHeadCafe - Software Developer Portal of Choice WPF Report Engine, Part 2 You could try hiding toolbar buttons you don't need using JavaScript. This code will hide "Create Invoice" button on "Order" entity form. var mb = document.getEle...

Combo box and can it feed two separate control sources
I have a combo box in a form, it draws it's information from a table with two fields, description and price. I can bind either one to a field (control source) in my form, but I wish to bind both fields i.e.description and price to two feilds on my form so when it puts the description into (lets call it field one) I want the price to go into a second field (lets call it field two) simultaneously. I appologise if some of you have seen this question already I did receive an e mail telling me I had a reply, on following the link on the mail though it just came up with a blank page a...

Using the 'onChange' Event to control data entry.
I would like to know if anyone has any significant experience customizing CRM and using the onChange event. I have created a number of custom fields and what I would like to do is have an onChange event that makes some fields unavailable when a certain item is chosen from the dropdown list. Is this at all possible? Cheers, Rob. Rob, Is it possible? Yes. Will it be supported? No. One problem you will run into is how to "trigger" this code when an existing record is displayed. This is where you are going to get into unsupported changes. You will need to modify the page so ...

Attachments have lost descriptive text, which now appears embedded in email text
Thanks in advance, if anyone has a suggestion. Attachments downloaded from a list serve used to display fine (subject of the attachment). Something changed. Now attachments are displayed as a list or array, of incomprehensible attachment titles. Within the text of the email there IS a list of the attachments. I now have to find the correct attachment within the body of the email, count and see what number the attachment is (like #3 of 4 attachments) and then count along the list of attachments outside the message box and open that attachment number. What a pain! I tried righ...

Formatted text in multiple lines in CListCtrl
I would like to know how can I display formatted text (Different fonts and colors) in multiple lines in a single cell in CListCtrl icon view. I have seen samples on codeproject/codeguru that deals with changing text color/font. But I would like to display formatted text (e.g: Some bold text and some different color in multiple lines in a single cell) along with an icon in each cell. How can I achieve this using CListCtrl? If not, can you please suggest any alternative solutions? Thanks in advance. Sounds like you need an owner-draw control. Then you can do pretty much anything you want. ...