Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do I get rid of the space?

Status
Not open for further replies.

blueangel76

Technical User
Feb 15, 2007
11
US
Ok, here is the code I have:

intNextWMWk = WMWeek.Value + 1

If WMWeek.Value < 10 Then
strWMWeek = Str(Year(Date)) & Left("0" & WMWeek.Value, 2)
strNextWMWk = Str(Year(Date)) & Left("0" & intNextWMWk, 2)
Else
strWMWeek = Str(Year(Date)) & WMWeek.Value
strNextWMWk = Str(Year(Date)) & Str(intNextWMWk)
End If

strNextWMWk comes out with a space like this: "2007 12"

Why and what can I do about it to get rid of it? I need it to be "200712"

TIA,
Angie
 




Hi,
Code:
   strWMWeek = Str(Year(Date)) & Format(WMWeek.Value, "00")
   strNextWMWk = Str(Year(Date)) & Format(intNextWMWk, "00")

Skip,

[glasses] [red][/red]
[tongue]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top