Option Group and Queries

Shellsbells5364

New member
Local time
Yesterday, 18:19
Joined
May 5, 2015
Messages
4
Hello All:

I used an option group to classify a record in my database. It works great for this purpose, but I am at the point now of creating a query, and I would like to query based on these classifications (or options). Is this possible to do?

Also, for the option buttons, the value is numeric. When I create the Query (or a report off of that query) I would like the actual text values to display, not the data value Access is using.

Any help would be greatly appreciated!! =) =)

Shells
 
you cannot display the text values of an optionbox in a query as such but suince the values are fixed you could use something like the choose function in your query (this assumes your options start at 1 and increment by 1


e.g.

OptionChoice:choose(forms!myform!optionbox,"first option","second option")
 
For this sort of thing it's probably best to create a table that will hold the textual representation of your data, then you can link to this table and display the text. I.e.:
Code:
ID     Meaning
----   --------------
1      Vegetables
2      Confectionary
As for querying, query using the numeric value.
 

Users who are viewing this thread

Back
Top Bottom