Expression Hides Query From Excel (1 Viewer)

tanyamc

Registered User.
Local time
Today, 02:45
Joined
Mar 7, 2019
Messages
43
I have added this to a query

Category: iIF([Number of total miles for this week]<=15,"turtle", iIF(Eval([Number of total miles for this week] Between 15 And 36),"fox", iIF([Number of total miles for this week]>=36,"lion", " ")))

It functions as expected in Access.

However, when I try to pull the query into Excel, the query that has the above included no longer shows on list of queries in the database.
 

Ranman256

Well-known member
Local time
Today, 04:45
Joined
Apr 9, 2015
Messages
4,339
Excel cant understand some queries. This is one.
make 3 subQueries,
<=15
15-36
>36

then put them all into a UNION query
select * from Q1
union
select * from Q2
union
select * from Q3


see if XL will read that.
 

tanyamc

Registered User.
Local time
Today, 02:45
Joined
Mar 7, 2019
Messages
43
Thanks. I have eight queries (one per week) so would this create 4x that many? I am a newbie so bear with me!
Would Excel understand if I had the Category field look for a matching range in a table or something instead?
 

tanyamc

Registered User.
Local time
Today, 02:45
Joined
Mar 7, 2019
Messages
43
I created a table with high/low values for the categories and used a between function.
 

Users who are viewing this thread

Top Bottom