Expressions

  • Thread starter Thread starter stevew
  • Start date Start date
S

stevew

I have set up a query in a Returns Database and I am using the
following expression for one of the fields:

[WBDefectDescription] & (" -- "+[WPDefectDescription]) & (" -- "+
[MILLDefectDescription]) & (" -- "+[TSDefectDescription]) & (" -- "+
[TEDefectDescription]) & (" -- "+[BEDefectDescription]) & (" -- "+
[ErrorDescription]) & (" -- "+[CBDefectDescription]) & (" -- "+
[OFDescription])

The problem I have is that the dashes within the quotation marks show
up at the beginning of all of my results EXCEPT if there is a
WBDefectDescription or there are none of the above descriptions. I
really want to use a semicolon instead of the dashes (I tried that
prior to changing to the dashes...), but no matter what I try I get
similar results.

Can anyone please help me figure out what I may be doing wrong or let
me know if there is nothing that can be done? I am open to any
suggestions!

Thanks!
 
I have set up a query in a Returns Database and I am using the
following expression for one of the fields:

[WBDefectDescription] & (" -- "+[WPDefectDescription]) & (" -- "+
[MILLDefectDescription]) & (" -- "+[TSDefectDescription]) & (" -- "+
[TEDefectDescription]) & (" -- "+[BEDefectDescription]) & (" -- "+
[ErrorDescription]) & (" -- "+[CBDefectDescription]) & (" -- "+
[OFDescription])

The problem I have is that the dashes within the quotation marks show
up at the beginning of all of my results EXCEPT if there is a
WBDefectDescription or there are none of the above descriptions. I
really want to use a semicolon instead of the dashes (I tried that
prior to changing to the dashes...), but no matter what I try I get
similar results.


Try this:

Mid(("; "+[WBDefectDescription]) & ("; "+[W . . .), 3)
 
I have set up a query in a Returns Database and I am using the
following expression for one of the fields:
[WBDefectDescription] & (" -- "+[WPDefectDescription]) & (" -- "+
[MILLDefectDescription]) & (" -- "+[TSDefectDescription]) & (" -- "+
[TEDefectDescription]) & (" -- "+[BEDefectDescription]) & (" -- "+
[ErrorDescription]) & (" -- "+[CBDefectDescription]) & (" -- "+
[OFDescription])
The problem I have is that the dashes within the quotation marks show
up at the beginning of all of my results EXCEPT if there is a
WBDefectDescription or there are none of the above descriptions.  I
really want to use a semicolon instead of the dashes (I tried that
prior to changing to the dashes...), but no matter what I try I get
similar results.

Try this:

Mid(("; "+[WBDefectDescription]) & ("; "+[W . . .), 3)

--
Marsh
MVP [MS Access]- Hide quoted text -

- Show quoted text -

Marsh

Thanks so much!!! I worked perfectly!

If I could be so bold as to ask you to explain what you did? It would
help me understand better what is going on in my database.

Thanks again!!!

Steve
 
I have set up a query in a Returns Database and I am using the
following expression for one of the fields:
[WBDefectDescription] & (" -- "+[WPDefectDescription]) & (" -- "+
[MILLDefectDescription]) & (" -- "+[TSDefectDescription]) & (" -- "+
[TEDefectDescription]) & (" -- "+[BEDefectDescription]) & (" -- "+
[ErrorDescription]) & (" -- "+[CBDefectDescription]) & (" -- "+
[OFDescription])
The problem I have is that the dashes within the quotation marks show
up at the beginning of all of my results EXCEPT if there is a
WBDefectDescription or there are none of the above descriptions.  I
really want to use a semicolon instead of the dashes (I tried that
prior to changing to the dashes...), but no matter what I try I get
similar results.

Try this:

Mid(("; "+[WBDefectDescription]) & ("; "+[W . . .), 3)

Thanks so much!!! I worked perfectly!

If I could be so bold as to ask you to explain what you did? It would
help me understand better what is going on in my database.


Adding a "; " to the first field guarantees there will
always (if any field is non-Null), be the extra two
characters at the beginning of the result. Then the Mid
function can easily remove them without knowing if any of
the individual fields were Null or not.
 
Back
Top