A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Control source in text box



 
 
Thread Tools Display Modes
  #1  
Old July 24th, 2007, 09:47 PM posted to microsoft.public.access.reports
bobojones
external usenet poster
 
Posts: 4
Default 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?

Thanks


  #2  
Old July 24th, 2007, 10:12 PM posted to microsoft.public.access.reports
Carl Rapson
external usenet poster
 
Posts: 517
Default Control source in text box

"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


  #3  
Old July 24th, 2007, 10:26 PM posted to microsoft.public.access.reports
Mikal via AccessMonster.com
external usenet poster
 
Posts: 42
Default Control source in text box

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
Mike

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?

Thanks


--
Mike Pippins

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

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...ports/200707/1

  #4  
Old July 25th, 2007, 02:44 PM posted to microsoft.public.access.reports
bobojones
external usenet poster
 
Posts: 4
Default Control source in text box

Thanks, This works great
"Carl Rapson" wrote in message
...
"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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 04:25 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.