I have an MS Access 2000 table which contains the following columns/fields: (id, grade1, grade2, grade3, grade4, ages). Grade1 through Grade4 are of type Boolean, and ages is a String type. For a given row, the value of ages is a function of the values of grade1 through grade4, i.e., the value that is to be stored in ages is derived/calculated from the values in fields grade1 through grade4. Examples:
For a given row with the values of grade1 through grade4 as True, False, True, False, the field, ages, in that row should contain the string "grades 1, 3".
For a given row with the values of grade1 through grade4 as False, True, True, True, the field, ages, in that row should contain the string "grades 2-4".
I have written a Visual Basic user-defined function which correctly produces the resultant string based on the values of the grade1 through grade4 fields, but I do not know how to make the result be stored in the ages field of the table. Can anyone please help me?
(Right now, for testing purposes, I am outputting the string to a 'calculated control' on a form. The name of my function is "F1", and in the properties Control Source of the field on the form I have "=F1()". But I would like the result of my function to be stored in the ages column of the current row. How does one do that? Or am I going about this in completely the wrong way? Any help would be greatly appreciated.)
Thank you.
Richard E. Adams
Email: RAdams@dhs.ca.gov
For a given row with the values of grade1 through grade4 as True, False, True, False, the field, ages, in that row should contain the string "grades 1, 3".
For a given row with the values of grade1 through grade4 as False, True, True, True, the field, ages, in that row should contain the string "grades 2-4".
I have written a Visual Basic user-defined function which correctly produces the resultant string based on the values of the grade1 through grade4 fields, but I do not know how to make the result be stored in the ages field of the table. Can anyone please help me?
(Right now, for testing purposes, I am outputting the string to a 'calculated control' on a form. The name of my function is "F1", and in the properties Control Source of the field on the form I have "=F1()". But I would like the result of my function to be stored in the ages column of the current row. How does one do that? Or am I going about this in completely the wrong way? Any help would be greatly appreciated.)
Thank you.
Richard E. Adams
Email: RAdams@dhs.ca.gov