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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can't hide form

Status
Not open for further replies.

Netherby

Programmer
Nov 9, 2001
32
GB
Hi,

I'm trying to hide an Acess 2000 form using the following but the form won't disappear.

frmName = "StartUp"
If SysCmd(acSysCmdGetObjectState, acForm, frmName) <> conObjStateClosed Then
Forms!StartUp.Visible = False
End If

I can step through the code OK without error but the form stays visible. If I run Forms!StartUp.Visible = False then that works OK providing I've not run the above code first. If I have run all the code beforehand, the form stays visible.

Any help is greatly appreciated.

 
some procedure
hideFrm "StartUp"
end sub


Public Sub hideFrm(frmName As String)
If CurrentProject.AllForms(frmName).IsLoaded Then
Forms(frmName).Visible = False
End If
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top