I have a form that displays full employee info at the top, and then at the bottom, I have a subform of other info pertaining to the employee.
I'm trying to make a hide/show button on my form so that it:
1 - expands to show full detailed info with the subform at the bottom
2 - or hides all detailed info (showing only employee name and id number) and resizes the subform to fill the void of the hidden details.
The code to hide is written behind the click event procedure of a button I put on the form:
1 - I am setting all the detailed info (basically all the fields other than name and id number) visible property to false.
2 - I resize and reposition the subform using its .properties (ie subform.top = 1.125, subform.height = etc...)
the PROBLEM:
As soon as I get the the part where I start modifying the subform's properties, it dissapears. the code goes as follows:
Please help out or give me a better solution!
Thanks
----------------------------- If you are born once, you will die twice.
If you are born twice, you will die once.
I'm trying to make a hide/show button on my form so that it:
1 - expands to show full detailed info with the subform at the bottom
2 - or hides all detailed info (showing only employee name and id number) and resizes the subform to fill the void of the hidden details.
The code to hide is written behind the click event procedure of a button I put on the form:
1 - I am setting all the detailed info (basically all the fields other than name and id number) visible property to false.
2 - I resize and reposition the subform using its .properties (ie subform.top = 1.125, subform.height = etc...)
the PROBLEM:
As soon as I get the the part where I start modifying the subform's properties, it dissapears. the code goes as follows:
Code:
sbfEmpTrainDetails.Left = 0.0417
sbfEmpTrainDetails.Top = 1.125
sbfEmpTrainDetails.Width = 6.5833
sbfEmpTrainDetails.Height = 4.2083
'i put this in initially cuz I thot the form
'dissapeared.. this didn't work
'sbfEmpTrainDetails.Visible = True
sbfEmpTrainDetails.SetFocus
Please help out or give me a better solution!
Thanks
----------------------------- If you are born once, you will die twice.
If you are born twice, you will die once.