Control source in text box

  • Thread starter Thread starter bobojones
  • Start date Start date
B

bobojones

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
 
bobojones said:
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
 
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
 
Thanks, This works great
Carl Rapson said:
bobojones said:
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
 
Back
Top