Query on Text

A

ACDenver

I am attempting to query on the ending text of a field in a table. I am
using the expression... Right([description],4) ="test". I am hoping to see
records that have the description column with ending text of "text". When
I execute the query, the result is a notification...the specfiied field
'[description]' could refer to more than one table. I know what I need to
do conceptually. The "description" field is in to two tables - categories,
and codes.

But I don't know how to write the syntax to read the description from the
categories table.

Help.
 
K

KARL DEWEY

Right([TheCorrectTable]![description],4) ="test".

Better yet would be --
Like "*" & [Enter right-hand text]

Using this you can enter any number of characters, just so they are the
right-most characters.
 
D

Douglas J. Steele

Actually, queries can't use the bang (!) notation. You need

Right([TheCorrectTable].[description],4) ="test"

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)



KARL DEWEY said:
Right([TheCorrectTable]![description],4) ="test".

Better yet would be --
Like "*" & [Enter right-hand text]

Using this you can enter any number of characters, just so they are the
right-most characters.

ACDenver said:
I am attempting to query on the ending text of a field in a table. I am
using the expression... Right([description],4) ="test". I am hoping to
see
records that have the description column with ending text of "text".
When
I execute the query, the result is a notification...the specfiied field
'[description]' could refer to more than one table. I know what I need
to
do conceptually. The "description" field is in to two tables -
categories,
and codes.

But I don't know how to write the syntax to read the description from the
categories table.

Help.
 
Top