If form is Open Code Question?

D

Dave

I have form named TimeCards and from there I sometimes open
another form named Customers
On close event of the form Customers is the below code so that the main form
is visible again.
If TimeCards form is open , I need for the form frmAutoPayrollReport
to be invisible.
Can this be done ??

Thanks,

Dave



Forms!frmAutoPayrollReport.Visible = True
 
D

Dan Artuso

Hi,
You can use this function to see if a form is open:
Public Function IsOpen(strForm As String)
IsOpen = (SysCmd(acSysCmdGetObjectState, acForm, strForm) > 0)
End Function

HTH
Danm Artuso, MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top