By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,461 Members | 2,184 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,461 IT Pros & Developers. It's quick & easy.

is this a subquery problem?

P: n/a
Can anyone help me with a problem.

Using the DESIGN QUERY screen in Access ... I defined this field from
an existing table .. opinion votes.

politic_need: Mid$([opinionvotes].[vote_demographics],13,1)

It returns a one-character value - from 'A' through 'G'
I'd like to create a new expression (a sub-query!?) in my query that
looks up a friendly LABEL for this field .. based on the contents of
another table..

something like SELECT politics_label FROM politics WHERE politics_code
= politic_need

BUT I keep getting errors when I try to create it!. Any ideas!?

see http://www.rcbuchanan.com/subquery.jpg
for SCREENSHOT! [tough to describe otherwise! :-) ]
Thanks for any help! This is driving me nuts!
Richard
Nov 12 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Your query has a GROUP BY clause.

Try:
MyResult: ( SELECT politics_label FROM politics
WHERE politics_code = Mid([opinionvotes].[vote_demographics],13,1)
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html

"rich buchanan" <ri*****@rcbuchanan.com> wrote in message
news:74**************************@posting.google.c om...
Can anyone help me with a problem.

Using the DESIGN QUERY screen in Access ... I defined this field from
an existing table .. opinion votes.

politic_need: Mid$([opinionvotes].[vote_demographics],13,1)

It returns a one-character value - from 'A' through 'G'
I'd like to create a new expression (a sub-query!?) in my query that
looks up a friendly LABEL for this field .. based on the contents of
another table..

something like SELECT politics_label FROM politics WHERE politics_code
= politic_need

BUT I keep getting errors when I try to create it!. Any ideas!?

see http://www.rcbuchanan.com/subquery.jpg
for SCREENSHOT! [tough to describe otherwise! :-) ]
Thanks for any help! This is driving me nuts!
Richard

Nov 12 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.