ineffiecient pulldown box

undergrad

Registered User.
Local time
Today, 02:15
Joined
May 29, 2003
Messages
25
i have a "group by" query which outputs all the different enteries for the particular field. this query is the row source for a pulldown box on a form.

2 questions:

#1) does access run this query everytime a user uses the pulldown box? or do the query results remain until that query is specifically run again. (manually or coded)


#2) is it possible to retreive all values out of a field. ie don't just group by record, but also by multiple enteries in a single record. i.e. in one field you may have the following

light water
gas
air
light water
air
light water, air, Be
air, be
Na

could you inturn make a query to list only

light water
gas
Be
Na


again thanks for any help
 
#1 - Yes, even with stored queries, Access needs to run them each time. Access has no way of knowing if your data or table structure has changed unless it reruns the query.

#2 - not easily. You really need to separate out the entries into their own field. Not that it can't be done, you'd just have to jump through a few hoops to do something that would be far simpler if your data were structured "correctly" with one entry per field.
 
By the way, you don't need to run a "group by" query if you're just looking to get the unique different entries from a table to use as the source for your combo box. You can use a SELECT DISTINCT query instead.
 
okay thanks for you help. its good to know that the query results will be refreshed when the pull down box is selected.

i would love to have a database with "correctly structured" data but this database has had like 4 different owners.
thanks again
 

Users who are viewing this thread

Back
Top Bottom