TRIM in a CONCATENATED FIELD

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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])
 
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
 
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])
 
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])
 
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])
 
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])
 
Back
Top