Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Concatenated field

Status
Not open for further replies.

Eddyoftheyear

Technical User
Aug 11, 2010
57
US
Hi All,

I have a concatenated field separated with a dash.

Example, 555145520-5556

Is there a way that the I can show the whole number all time, but when the number starts with 5200 then it only show the numbers before the dash.

Inv#: [Invoice#] & "-" & [InvoiceID]

Thanks
 
Inv#: IIf(Left([Invoice#],4)=5200,[Invoice#],[Invoice#] & "-" & [InvoiceID])

And I would suggest not using # (or other special characters in your field or object names).


Bob Larson
Free Access Tutorials and Samples:
 
Hi Bob,

I tried it but it did not work. I still have the same information in the result. The numbers like 52000-4585 is still showing. I want to be able to see 52000

IIf(Left([Invoice#],4)=5200,[Invoice#],[Invoice#] & "-" & [InvoiceID])

Thanks
 
And this ?
Inv#: IIf(Left([Invoice#],4)="5200",[Invoice#],[Invoice#] & "-" & [InvoiceID])

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top