How can I trim the "-" in the following:
Liner: [OutsideLinerWeight] & "-" & [1MediumWeight] & "-" & [2LinerWeight] &
"-" & [2MediumWeight] & "-" & [3LinerWeight] & "-" & [3MediumWeight] & "-" &
[4LinerWeight]
Thanks!
Could you explain what you mean by "trim"?
If you want the hyphen prior to a Weight field to be omitted if the
field is NULL, you can use the fact that the + operator concatenates
strings, but - unlike & - propagates NULL values. Try
Liner: [OutsideLinerWeight] & ("-" + [1MediumWeight]) &
("-" + [2LinerWeight]) &
("-" + [2MediumWeight]) &
("-" + [3LinerWeight]) &
("-" + [3MediumWeight]) &
("-" + [4LinerWeight])
Note that storing data in fieldnames as you are doing is a *serious*
violation of good database design rules. If you have a 4LinerWeight,
someday you will have a 5LinerWeight value to enter, and you'll be in
trouble when you need to redesign your tables, queries, forms and
reports to handle it! If you have a one to many relationship from
whatever this table represents to multiple weights, *model it as a one
to many relationship*. "Fields are expensive, records are cheap"!
John W. Vinson[MVP]