dr.stitch Posted April 4, 2008 Posted April 4, 2008 Hello. I am working on a research project which tracks ethnicities of our subjects among many other things. The database that I was given to work with has a separate field for each ethnicity and is displayed as a checkbox. For example, in one record, "African American" has its own checkbox, "Filipino" has its own checkbox, "Hawaiian" has its own checkbox, etc. I am trying to create a report where I can summarize each subjects' ethnicity in one textbox. So if a subject has the "African American", "Filipino", "Hawaiian" checkbox marked, it would show up in an i.e. ETHNICITY field I have created as comma-delimited text. So under ETHNICITY, I would have: African American, Filipino, Hawaiian. It seems I need to perform a loop of some sort, but not sure if that is the best way of approaching this. Please help!
mr_vodka Posted April 4, 2008 Posted April 4, 2008 You should just be able to use a calc. Substitute ( List ( AfricanCheck; FilipinoCheck; HawaiianCheck ); "¶"; ", " )
dr.stitch Posted April 4, 2008 Author Posted April 4, 2008 Thank you for your help! This code, however, returns the value of the checkbox (i.e. 1, 1, 1 if the African American, Filipino, Hawaiian checkboxes are marked) rather than the actual name of the ethnicity. So basically what I'd like show up in the field ETHNICITY are: African American, Filipino, Hawaiian rather than numbers. Any other suggestions? }:(
-Queue- Posted April 4, 2008 Posted April 4, 2008 Something like LeftWords( Case( AfricanCheck, "African, " ) & Case( FilipinoCheck, "Filipino, " ) & Case( HawaiianCheck, "Hawaiian" ), 9 ) should work.
dr.stitch Posted April 5, 2008 Author Posted April 5, 2008 You're wonderful! It works perfectly. Thank you! }:(
Recommended Posts
This topic is 6077 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now