J
jeanulrich00
Hi
I have a table (Cumul) containing many information fields and a serie
of [A1], [A2], [A3], [A4] and so on until [A48]
In this table I also have a field named [PeriodNo]
On a form, the user select a period (let say period No 3)
I have a query (Q-Cumul) based on table (Cumul)
In this query I have a criteria on the field [PeriodNo] ([PeriodNo] =
[forms]![Myform]![PeriodNo] So the result query show all records of
period 3
Finaly I have a final form based on the query that shows all
informations.
Here is what I want.
When the user select Period 3, I want to see on the final form all
informations + field[A3]
If the user select Period 7, I want to see all information's fields +
field [A7]
User select Period 22, I want to see all information's fields + field
[A22]
I know I can write a script on the opening event of the form like
First I can pile all fields [A1], [A2], [A3]....until [A48} on the
form and put all the fields invisible
Then on the opening event of the form something like
if [PerionNo] = 1 then [A1].visible = true
if [PeriodNo] = 2 then [A2].visible = true
if [PeriodNo] = 3 then [A3].visible = true
and so on
But I am looking for a better way to do it
Thanks for helping
I have a table (Cumul) containing many information fields and a serie
of [A1], [A2], [A3], [A4] and so on until [A48]
In this table I also have a field named [PeriodNo]
On a form, the user select a period (let say period No 3)
I have a query (Q-Cumul) based on table (Cumul)
In this query I have a criteria on the field [PeriodNo] ([PeriodNo] =
[forms]![Myform]![PeriodNo] So the result query show all records of
period 3
Finaly I have a final form based on the query that shows all
informations.
Here is what I want.
When the user select Period 3, I want to see on the final form all
informations + field[A3]
If the user select Period 7, I want to see all information's fields +
field [A7]
User select Period 22, I want to see all information's fields + field
[A22]
I know I can write a script on the opening event of the form like
First I can pile all fields [A1], [A2], [A3]....until [A48} on the
form and put all the fields invisible
Then on the opening event of the form something like
if [PerionNo] = 1 then [A1].visible = true
if [PeriodNo] = 2 then [A2].visible = true
if [PeriodNo] = 3 then [A3].visible = true
and so on
But I am looking for a better way to do it
Thanks for helping