text box if statement does not work when displayed in main form

D

deb

I have a subform (fExtraHrsDetails)with the below code.
If the field (Stage) is "Active" the text box (ProjIDCL) is displayed
else
the text box(ProjID) is displayed

Private Sub Form_Current()
If Me.Stage = "Active" Then
ProjIDCL.Visible = True
ProjID.Visible = False
Else
ProjIDCL.Visible = False
ProjID.Visible = True
End If
End Sub

This works great in the subform, however, when I display the main form, the
sub form does not display the correct text box.

What am I doing wrong?
Why does it work in the subform and when I display the main form is is not
working???
 

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