Adding a hyphen

stattad

Registered User.
Local time
Today, 08:09
Joined
Oct 5, 2005
Messages
19
Can someone give me an easy way to put a hyphen between two numbers, such as with wins and losses of teams? I want it to come out 5-3, not 5 3.

I tried entering a text box with no success.
 
OldNumber is 2-digit number.

NewNumber = Left(OldNumber,1) & "-" & Right(OldNumber,1). There should be even a quicker way, standby...
 
It sounds like I have to run this query after my original query? There are 20 numbers in my query, and nine different hyphens in various places. I'm not sure this would work.
 
What do you mean by 20 numbers in your query? How are you getting the current value of 5 3? When you concatenate fields, you can also include literal values in the string.

Rather than Field1 & Field2, you would use Field1 & "-" & Field2 to add a dash between the two fields being concatenated.
 

Users who are viewing this thread

Back
Top Bottom