Good q.
There are several ways to approach this, especially if you don't think the options will ever change. Since everything ALWAYS changes, I would probably go with a link table to create a M-M relation between the Amenities table and the Main table. Each record in the LINK table would associate an amenity with a record in MAIN.
This will allow you to add amenities easily without breaking anything, and would also let users see something more humanly descriptive than A8BC.
FWIW
>Hi everyone,
>
>In my main table I have 10 character Amenity field. This field could be empty or could be like:
>
>AB
>CD
>A8BC
>BCDFJ
>
>where each letter is a coded value.
>In Amenities Lookup table I have each code and its description, like, for instance:
>(don't show the actual codes)
>A - Air Conditioned
>etc.
>
>User selects one or multiple codes from multilist:
>This is the code, I use for creating where expression:
>
>
>* return criterion for field value
> lnLen=alen(.btcSelArray, 1)
> for li = 1 to lnLen
> m.crit=m.crit+ iif(li=1,iif(.ExcludeFlag, '! ', ''),iif(.ExcludeFlag, ' AND ! ', ' OR '))+;
> '"'+.btcSelArray[li]+'" $ '+mapto
> endfor
>
>
>My question is: do you think it's the best solution or there is another better solution?
>
>Thanks in advance.
Kogo Michael Hogan
"Pinky, are you pondering what I'm pondering?"
I think so Brain, but "Snowball for Windows"?
Ideate Web Site