Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error on hide form 1 and open form 2?

Status
Not open for further replies.

Halet

MIS
Jun 26, 2007
13
US
I'm created startup form and there is a button there for me to click and hide it and then open my next form. I used the following code. It hided startup form and open the switchboard form but I'm not able to do anything to the switchboard form because the cursor remain positioned in the startup form unless I closed it. It won't let me move to switchboard form. Also, this function when click hided the access application. Please let me know how to resolve these issues. Many thanks!

Option Compare Database

Function HideForm()
' Hide Startup form.
' Used in OnClick property of OK command button on Startup form.
DoCmd.minimize
DoCmd.OpenForm ("Main Switchboard")
End Function
 
To hide a form use the forms visible property. Examples

me.visible = false
forms("myForm").visible = false

The other thing if a form is modal then you can not set the focus to other forms until you close the modal form. So if you mininmize a modal form you can not move the focus to another form. However if you make it invisible you can set the focus. Set the visible to true to reshow the form.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top