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!

[b]Concatenation of values[/b]

Status
Not open for further replies.

vani65

Programmer
May 19, 2003
101
AU
Hi,
Can I put this field values in double qoutes in a query
([tlkpStockLocation].[StockLocationID]) & " " &" " ([tlkpStockLocation].[StockLocationDescr]. I am not able to figure it out.Can someone please help me. Thanks in advance.
 
Not sure what you are asking. What do you want returned? Example:
stockLocationID = 1234
stockLocationdesc = ShelfOne
You are now returning
1234 ShelfOne
With two spaces between 1234 and ShelfOne. Are you saying you want one of these?
1234" "" "ShelfOne
"1234""ShelfOne"
"1234" "ShelOne"
1234""ShelfOne
 
vani65,
Your expression is missing an "&" as well as a ")".

Yours:
([tlkpStockLocation].[StockLocationID]) & " " &" " ([tlkpStockLocation].[StockLocationDescr].

Possibly corrected:
([tlkpStockLocation].[StockLocationID]) & " " & " " & ([tlkpStockLocation].[StockLocationDescr])

or
([tlkpStockLocation].[StockLocationID]) & " " & ([tlkpStockLocation].[StockLocationDescr])

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
You wanted something like this ?[tt]
tlkpStockLocation.StockLocationID] & ' "' & tlkpStockLocation.StockLocationDescr & '"'[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
OOps, sorry for the typo:
tlkpStockLocation.StockLocationID[tt] & ' "' & [/tt]tlkpStockLocation.StockLocationDescr[tt] & '"'[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi,
Thanks for immediate reply. I came back today and used what PHV suggested.
[tlkpStockLocation].[StockLocationID] & ' - "' & [tlkpStockLocation].[StockLocationDescr] & '"'
I am getting
1234 - "ShelfOne" but I need
"1234" - "ShelfOne"
 
You obviously may try this:
[tt]'"'[/tt] & [tlkpStockLocation].[StockLocationID] & [tt]'" - "'[/tt] & [tlkpStockLocation].[StockLocationDescr] & [tt]'"'[/tt]

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Hi PHV,
That worked great. Once again thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top