here is the deal I have a form with a command button to open another form. I would like to check if another form is loaded and use the code to close that form. simple right?
I've dinked with variations on the above code and get an error "the form is not loaded" or "applicatio n object not defined" or "that method not available".
I cannot determine why. What am I missing?
any help is greatly appreciated & I'm much obliged
/jh
Code:
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentProject
Set frm = dbs.Forms!frmCaseInfo
If frm.IsLoaded = True Then
DoCmd.SelectObject acForm, "frmCase", False
DoCmd.Close
I cannot determine why. What am I missing?
any help is greatly appreciated & I'm much obliged
/jh
Comment