kumarangopi
Member
- Joined
- Apr 12, 2008
- Messages
- 14
- Programming Experience
- Beginner
Iam doing a small form where two push buttons.one for accept data into structure,second display data.I have used structures with following structure
structure student
dim sname as string
dim sage as integer
end structure
Since I want to accept more than 1 students information, I went to arrays.The key is that iam accepting the array index from the user like "How many students information you want to enter" and then iam declaring structure array like this:
dim sstruct(num) as student
'where num is the index accepted from user
The above declaration is in button1.When I go to button2 for display,I cannot use num value in for loop since it is local to button1.How to do this now?I dont want the user to enter the index value while form load.Only when user clicks first button,he should enter index value.
Hope my question is clear
structure student
dim sname as string
dim sage as integer
end structure
Since I want to accept more than 1 students information, I went to arrays.The key is that iam accepting the array index from the user like "How many students information you want to enter" and then iam declaring structure array like this:
dim sstruct(num) as student
'where num is the index accepted from user
The above declaration is in button1.When I go to button2 for display,I cannot use num value in for loop since it is local to button1.How to do this now?I dont want the user to enter the index value while form load.Only when user clicks first button,he should enter index value.
Hope my question is clear