I'll try to explain a simple example
Access 97 (probably the same for other versions of access)
Consider a report with a detail section (very narrow) containing a text box txtken.
I can drag and drop a field say A1 from the field list (icon in tool bar) into txtken and this will show a column of the field records when the report is opened. A1 reprsents the marks for a certain subject.
What I want to do is to be able to put the field A1 into txtken by writing an expression in the report open event. This should then
show a column of of the field records for A1 when the report is opened as explained above.
The reason for this is that in a school database I want to put different fields in txtken depending on the subject that is selected.
The way I intend to do this is to use a Select Cast statement. So, depending on the subject, I want to put different field references into txtken. For example if the subject is electronics then I want Field A1 to be be in txtken with the control source for txtken refering to Field A1. Similarly if the subject is control then I want Field B1 to be in txtken with the control source for txtken refering to Field B1.
I have had no success in writing the expression(s) in the report open event and yet I know it must be fairly simple.
I hope someone can help me
Thevenin
Access 97 (probably the same for other versions of access)
Consider a report with a detail section (very narrow) containing a text box txtken.
I can drag and drop a field say A1 from the field list (icon in tool bar) into txtken and this will show a column of the field records when the report is opened. A1 reprsents the marks for a certain subject.
What I want to do is to be able to put the field A1 into txtken by writing an expression in the report open event. This should then
show a column of of the field records for A1 when the report is opened as explained above.
The reason for this is that in a school database I want to put different fields in txtken depending on the subject that is selected.
The way I intend to do this is to use a Select Cast statement. So, depending on the subject, I want to put different field references into txtken. For example if the subject is electronics then I want Field A1 to be be in txtken with the control source for txtken refering to Field A1. Similarly if the subject is control then I want Field B1 to be in txtken with the control source for txtken refering to Field B1.
I have had no success in writing the expression(s) in the report open event and yet I know it must be fairly simple.
I hope someone can help me
Thevenin