Shared Module string

  • Thread starter Thread starter Avi
  • Start date Start date
A

Avi

hello,

how can i use the same module to perform the same actions
on multiple reports... the on activate event calls this
module that hides extra fields based on the users size
grade... for example, if the part has 3 sizes only 3 of
the 24 fields will show up.... I have crated reports
that allow more 'real-estate' for text... and if
confronted with a 5 sizes on a 6 field report... be able
to hide field 6, but use the module on ALL reports
without re-writting the moduel 12 times....

the module looks like this

Function NoGrade()
reports!rpt_sizereport_4.grade6.visible = false
end function

i want to be able to do this...

Function NoGrade(strName as string)
reports!" & strName & ".grade6.visible = false
end function

so that 'strNAme' can be any of the 4 new reports to make
the string read:

reports!rpt_sizereport_6.grade6.visible = false

and have it work!


sorry for the confusion, but hopefully someone can
straigtem me out!

Avi.
 
Avi said:
how can i use the same module to perform the same actions
on multiple reports... the on activate event calls this
module that hides extra fields based on the users size
grade... for example, if the part has 3 sizes only 3 of
the 24 fields will show up.... I have crated reports
that allow more 'real-estate' for text... and if
confronted with a 5 sizes on a 6 field report... be able
to hide field 6, but use the module on ALL reports
without re-writting the moduel 12 times....

the module looks like this

Function NoGrade()
reports!rpt_sizereport_4.grade6.visible = false
end function

i want to be able to do this...

Function NoGrade(strName as string)
reports!" & strName & ".grade6.visible = false
end function

so that 'strNAme' can be any of the 4 new reports to make
the string read:


You can refer to items in any collection by using the item's
index. Most collections use the name of the item as its
string index. This means that you can use the syntax:

Reports(strName).grade6.visible = false
 
Back
Top