on 02-17-2011 9:41 AM
HI Community,
I just declared a variable in the initialize event of one of my fields in my subform.
var help = "1";
Now I want to use this help variable in my exit event of the same field.
But it doesn't work out?
greets
Chris
Hi Chris,
If you declare a variable in any of the events, its scope it limited in that event only. You cannot access it in other events.
If you want to use a variable across events, you have to create seperate script objects and declare the variables.
1) Right click your main form / subform
2) Click 'Insert Script Object'
3) Script Objects gets created in the Hierarchy view under variables
4) Give a new name and you can declare the global variables in it
If you declare a variable like var help = "1"; in the script object, it can be accessed by following the path.
subform.variables.scriptobjectName.help
Hope this will help.
Thanks & Regards,
Sanoosh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
76 | |
9 | |
8 | |
7 | |
6 | |
5 | |
5 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.