Syntax to refer to subform control

C

CJ

Hi groupies

I am trying to make a label on a subform disappear but I can not get the
syntax correct.
I have tried many variations but this is what I have at the moment. Needless
to say, nothing happens.

<snip>
If txtPassword = strPassword Then
DoCmd.Close

' start area of trouble
Set frmJobMlt = Screen.ActiveForm

Forms![frmJobMlt]![fsubMLT].Form![lblCompleted].Visible = False
Forms!frmJobMlt.Repaint
'end area of trouble
<snip>

Can somebody please correct it for me?
 
G

geppo

Ciao "CJ said:
Hi groupies

I am trying to make a label on a subform disappear but I can not get the
syntax correct.
I have tried many variations but this is what I have at the moment.
Needless to say, nothing happens.

<snip>
If txtPassword = strPassword Then
DoCmd.Close

' start area of trouble
Set frmJobMlt = Screen.ActiveForm

Forms![frmJobMlt].[fsubMLT].Form.[lblCompleted].Visible = False
 
C

CJ

geppo said:
Ciao "CJ said:
Hi groupies

I am trying to make a label on a subform disappear but I can not get the
syntax correct.
I have tried many variations but this is what I have at the moment.
Needless to say, nothing happens.

<snip>
If txtPassword = strPassword Then
DoCmd.Close

' start area of trouble
Set frmJobMlt = Screen.ActiveForm

Forms![frmJobMlt].[fsubMLT].Form.[lblCompleted].Visible = False

Forms!frmJobMlt.Repaint
'end area of trouble
<snip>

Can somebody please correct it for me?

Got it. Thanks a bunch!!
 
Top