I am creating a research db and am looking for a shortcut for some data editing.
THE SITUATION: I have a series of questions that ask a respondent to check any and all reasons why they believe something. Obviously since it is an "any or all" (there are 8 options) I had to create individual variables for each option. Additionally, I used check boxes for the data entry. Since these are boolean Access assigns a 0 for false and a -1 for true. Our boolean convention here is a 1 for false and a 5 for true.
THE QUESTION: What I would like to do is create a runtime array or matrix that would look at each variable and edit the value from 0 to 1 and from -1 to 5. The variable names follow this naming convention: ETH191 - ETH198, ETH201 - ETH208, etc. How can I do this?
MY LONG WAY ATTEPMT: I know there has to be an easier way but, given my 'neophyte' programming status here is what I am doing. Presently I am looking at creating a bunch of If..Then statements that read something like:
IF ETH191 = 0 Then
ETH191 = 1
End if
IF ETH191 = -1 Then
ETH191 = 5
End if
I would continue this from 191-198 through 291-298 or 88 times. That is a lot of code for a simple task. I know there is a better way.
SIDEBAR NOTES: It would be easier if I could actually change the default values of the checkboxes then I wouldn't have to do this. Also, this data will ultimately be exported, most likely to SAS for analysis. I could do the conversion in SAS, but if someone else wants to run any analysis I want them to be able to use the data straight away.
I thank you in advance for any help you may be able to provide!
THE SITUATION: I have a series of questions that ask a respondent to check any and all reasons why they believe something. Obviously since it is an "any or all" (there are 8 options) I had to create individual variables for each option. Additionally, I used check boxes for the data entry. Since these are boolean Access assigns a 0 for false and a -1 for true. Our boolean convention here is a 1 for false and a 5 for true.
THE QUESTION: What I would like to do is create a runtime array or matrix that would look at each variable and edit the value from 0 to 1 and from -1 to 5. The variable names follow this naming convention: ETH191 - ETH198, ETH201 - ETH208, etc. How can I do this?
MY LONG WAY ATTEPMT: I know there has to be an easier way but, given my 'neophyte' programming status here is what I am doing. Presently I am looking at creating a bunch of If..Then statements that read something like:
IF ETH191 = 0 Then
ETH191 = 1
End if
IF ETH191 = -1 Then
ETH191 = 5
End if
I would continue this from 191-198 through 291-298 or 88 times. That is a lot of code for a simple task. I know there is a better way.
SIDEBAR NOTES: It would be easier if I could actually change the default values of the checkboxes then I wouldn't have to do this. Also, this data will ultimately be exported, most likely to SAS for analysis. I could do the conversion in SAS, but if someone else wants to run any analysis I want them to be able to use the data straight away.
I thank you in advance for any help you may be able to provide!