All,
I have a form with some sub forms on it. I have a text field (pull down list with values). The values are: Working, Submitted, Approved, & Not Approved. Based on a selection I want certain fields in a subform to be visible or not to be visible, but it is not working because the code I am using actually shows the fields in the subform no matter what. Here is the code I am using:
If status.Value = "Working" Then
Forms!frm_PAF!frm_Products_Subform.Form!Add.Visible = False
Forms!frm_PAF!frm_Products_Subform.Form!Date.Visible = False
End If
If status.Value = "Submitted" Then
Forms!frm_PAF!frm_Products_Subform.Form!Add.Visible = True
Forms!frm_PAF!frm_Products_Subform.Form!Date.Visible = True
End If
In the first case above I want the Add and Date field not to be visible, but the code is not working, because it shows on the form.
In the second case above I want the Add and Date field to show, which it does, but I don't think the code is right based on the first selection.
Can someone help me with this?
I would appreciate any help,
Thanks,
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!
I have a form with some sub forms on it. I have a text field (pull down list with values). The values are: Working, Submitted, Approved, & Not Approved. Based on a selection I want certain fields in a subform to be visible or not to be visible, but it is not working because the code I am using actually shows the fields in the subform no matter what. Here is the code I am using:
If status.Value = "Working" Then
Forms!frm_PAF!frm_Products_Subform.Form!Add.Visible = False
Forms!frm_PAF!frm_Products_Subform.Form!Date.Visible = False
End If
If status.Value = "Submitted" Then
Forms!frm_PAF!frm_Products_Subform.Form!Add.Visible = True
Forms!frm_PAF!frm_Products_Subform.Form!Date.Visible = True
End If
In the first case above I want the Add and Date field not to be visible, but the code is not working, because it shows on the form.
In the second case above I want the Add and Date field to show, which it does, but I don't think the code is right based on the first selection.
Can someone help me with this?
I would appreciate any help,
Thanks,
Jerome Benton
JERPAT Web Designs
GOD Is Good All The Time!!!