Syntax to refer to subform control

  • Thread starter Thread starter CJ
  • Start date Start date
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?
 
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
 
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!!
 

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

Back
Top