TRIM in a CONCATENATED FIELD

J

JohnLute

How can I modify the following so that "-/+" is trimmed out?

Thanks for your help in advance!

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & " -/+ " &
[Length-TOL])
 
J

Jeff Boyce

John

Why do you (or perhaps, "when" do you) want to leave the literal string
" -/+ " out?

Consider using the IIF() function to decide when to keep/lose the literal...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
D

Douglas J. Steele

What Jeff's assuming, I believe, is that you don't want the -/+ to be there
for specific values of [Length-TOL] (likely when it's Null). If that's the
case, try

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & (" -/+ " +
[Length-TOL]))

or

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] &
IIf(IsNull([Length-TOL], "", " -/+ " & [Length-TOL]))



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jeff Boyce said:
John

Why do you (or perhaps, "when" do you) want to leave the literal string
" -/+ " out?

Consider using the IIF() function to decide when to keep/lose the
literal...

Regards

Jeff Boyce
Microsoft Office/Access MVP

JohnLute said:
How can I modify the following so that "-/+" is trimmed out?

Thanks for your help in advance!

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & " -/+ " &
[Length-TOL])
 
J

Jeff Boyce

Oho, Doug. Now you're a mind-reader?! I actually had picked the number
"4"!

Jeff

Douglas J. Steele said:
What Jeff's assuming, I believe, is that you don't want the -/+ to be
there for specific values of [Length-TOL] (likely when it's Null). If
that's the case, try

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & (" -/+ " +
[Length-TOL]))

or

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] &
IIf(IsNull([Length-TOL], "", " -/+ " & [Length-TOL]))



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jeff Boyce said:
John

Why do you (or perhaps, "when" do you) want to leave the literal string
" -/+ " out?

Consider using the IIF() function to decide when to keep/lose the
literal...

Regards

Jeff Boyce
Microsoft Office/Access MVP

JohnLute said:
How can I modify the following so that "-/+" is trimmed out?

Thanks for your help in advance!

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & " -/+ " &
[Length-TOL])
 
D

Douglas J. Steele

Skippy, Skippy, Skippy. <shakes head in dismay>

Where's Jeff? <g>

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jeff Boyce said:
Oho, Doug. Now you're a mind-reader?! I actually had picked the number
"4"!

Jeff

Douglas J. Steele said:
What Jeff's assuming, I believe, is that you don't want the -/+ to be
there for specific values of [Length-TOL] (likely when it's Null). If
that's the case, try

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & (" -/+ " +
[Length-TOL]))

or

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] &
IIf(IsNull([Length-TOL], "", " -/+ " & [Length-TOL]))



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jeff Boyce said:
John

Why do you (or perhaps, "when" do you) want to leave the literal string
" -/+ " out?

Consider using the IIF() function to decide when to keep/lose the
literal...

Regards

Jeff Boyce
Microsoft Office/Access MVP

How can I modify the following so that "-/+" is trimmed out?

Thanks for your help in advance!

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & " -/+ " &
[Length-TOL])
 
J

Jeff Boyce

When he gives you a straight line like that, your response is "I KNEW THAT!"

Jeff/Skip

Douglas J. Steele said:
Skippy, Skippy, Skippy. <shakes head in dismay>

Where's Jeff? <g>

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Jeff Boyce said:
Oho, Doug. Now you're a mind-reader?! I actually had picked the number
"4"!

Jeff

Douglas J. Steele said:
What Jeff's assuming, I believe, is that you don't want the -/+ to be
there for specific values of [Length-TOL] (likely when it's Null). If
that's the case, try

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & (" -/+ " +
[Length-TOL]))

or

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] &
IIf(IsNull([Length-TOL], "", " -/+ " & [Length-TOL]))



--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


John

Why do you (or perhaps, "when" do you) want to leave the literal string
" -/+ " out?

Consider using the IIF() function to decide when to keep/lose the
literal...

Regards

Jeff Boyce
Microsoft Office/Access MVP

How can I modify the following so that "-/+" is trimmed out?

Thanks for your help in advance!

Packet/Pouch Length: Trim([Length] & " " & [LengthUOM] & " -/+ " &
[Length-TOL])
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top