If active problem

chrisguk

Registered User.
Local time
Today, 00:22
Joined
Mar 9, 2011
Messages
148
Hi Guys,

I have a two part question.

First one is, if I have the following code:

Code:
    InvoiceCounter = 0
    InvoiceCounter = DCount("[CRCInvoiceID]", "tblSitesCRCLastInvoice", "[tblSitesCRCLastInvoice].[fkAccountsID] = [forms]![frmSitesCRCMain]![frmSitesAccount]![AccountID]")
    Counter_txt = InvoiceCounter

I need an if statement to say :

If frmSitesMain is active then do nothing

Else

execute the code above?

The other question is how to I hide a subform with the same scenario above?
 
By active do you mean loaded/running? If so, search here on IsLoaded.

You can hide the subform by setting the Visible property of the subform control to False.
 
By active do you mean loaded/running? If so, search here on IsLoaded.

You can hide the subform by setting the Visible property of the subform control to False.


Its okay dude I figured it out using the IsLoaded function
 

Users who are viewing this thread

Back
Top Bottom