I am writing a program to tabulate responses to 54 questions. Each question is answered “Yes”, “No”, or “N/A”. I set my table up with 3 fields for each question: Qx_Y,Qx_N, Qx_NA (with ‘x’ being the question #) – each field is a “Yes/No” data type.
Each question can only have one “Yes” answer. My plan was to write a subroutine for the “on update” event for each field to make sure the other two fields for that particular question were set to “False”: example: When Q1_Y is updated, the subroutine would set Q1_N and Q1_NA to False. When Q1_N is updated, the subroutine would set Q1_Y and Q1_NA to False, etc.
I do not want to create 162 subroutines (54 questions x 3 fields). Is there a way to write a subroutine that will identify what field was updated so I can then “compute” what other fields need to be updated? I guess I looking for a way to parse the field name from the “on update” event process?
This is a brand new project, so I am open to suggestions for a better way to do this as well. I just have to have something to demo the first of September.
Each question can only have one “Yes” answer. My plan was to write a subroutine for the “on update” event for each field to make sure the other two fields for that particular question were set to “False”: example: When Q1_Y is updated, the subroutine would set Q1_N and Q1_NA to False. When Q1_N is updated, the subroutine would set Q1_Y and Q1_NA to False, etc.
I do not want to create 162 subroutines (54 questions x 3 fields). Is there a way to write a subroutine that will identify what field was updated so I can then “compute” what other fields need to be updated? I guess I looking for a way to parse the field name from the “on update” event process?
This is a brand new project, so I am open to suggestions for a better way to do this as well. I just have to have something to demo the first of September.