115 pts.
 Why won’t my Access subform stay put?
Hi,

I have a main form with a subform below it. The subform supposed to be invisible and 5" from the top. When I click a button, it becomes visible and 0" from the top. When I double click the button, the subform is supposed to go back to being invisible and 5" from the top. For some reason, though, it ended up stuck at the top, even when it is invisible, and it remains there, covering all the data in my main form. When I try to reset the subform property to 5", my main form ends up cut off at the top and I don't understand why. I don't even know where to start looking for solutions. It's driving me crazy. Any insight would be much appreciated. Thank you!

 

 

 

 



 

 



Software/Hardware used:
ASKED: August 13, 2009  4:26 PM
UPDATED: August 17, 2009  7:46 PM

Answer Wiki:
Using a click and double_click event on the same control can be problematic; chances are the double_click event is not firing due to timing with the double click. I recommend either using two different buttons; one for showing, one for hiding or try the below code, which uses the button caption to determine hiding or showing the sub form. Private Sub Command1_Click() If Command1.Caption = "Hide Form2" Then Form2.Visible = False Form2.Top = 5 Command1.Caption = "Show Form2" Else Form2.Visible = True Form2.Top = 0 Command1.Caption = "Hide Form2" End If End Sub Jules,
Last Wiki Answer Submitted:  August 14, 2009  3:49 pm  by  Elementj   45 pts.
All Answer Wiki Contributors:  Elementj   45 pts.
To see all answers submitted to the Answer Wiki: View Answer History.


Discuss This Question:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _


 

I didn’t even think that double-click might be interfering. I added buttons to hide the forms and it’s working well. Thank you.

 115 pts.