This topic is locked

Advanced Custom Expression in Lookup Table

3/10/2010 7:20:14 AM
ASPRunnerPro General questions
M
matt.cohen author

Hi,
I was wondering if it was possible to pull data from another table (Query) in a custom expression. I am using an access data base.

Something like the following
Model&' '& SELECT [Rental Companies].[Company Name] FROM [Rental Companies] WHERE [Rental Companies].[ID] = Company
I would like to display the actual name of the company not the id that is stored in the current table.
Thanks in advance
Matt
BTW all the docs say Access Databases require the + to concat strings but I could only get & to work ???

Sergey Kornilov admin 3/11/2010

It won't work this way. The best workaround is to create a query in MS Access that pulls data from both table and use it as a datasource in Lookup wizard.
PS. Ampersand operator is a proper way to concatenate strings in MS Access.

M
matt.cohen author 3/11/2010



It won't work this way. The best workaround is to create a query in MS Access that pulls data from both table and use it as a datasource in Lookup wizard.
PS. Ampersand operator is a proper way to concatenate strings in MS Access.


Thanks that works a treat.

The docs say that MS SQL and Access use a +. Had me trying + for a while until I googled &. You might want to change the docs to save some people time :-)
Thanks Again

Sergey Kornilov admin 3/11/2010

Matt,
thank you, we'll do that.