Ray Stantz
Registered User.
- Local time
- Today, 05:34
- Joined
- Nov 16, 2006
- Messages
- 63
Good Day! I have a form setup with mutiple fields:
Deliverables 1-35 (text fields)
Results 1-35 (Combo Boxes)
Comments 1-35 (Memo)
All fields are necessary for this form but depending on the circumstances, we may only use a few as oppose to all 35 for any given record. So what i've done is set delveribales 1-3, Results 1-3 and Comment 1-3 to always display and i've set Deliverables 4-35, Results 4-35 and Comments 4-35 to only display if the criteria is satisfied in the VBA code. For example i have Fields 4-6 to display only if Deliverables #3 contains a value.
If IsNull(Deliverable3) Or Deliverable3 = "" Then
Me.Deliverable4.Visible = False
Me.Results4.Visible = False
Me.Deliverable5.Visible = False
Me.Results5.Visible = False
Me.Deliverable6.Visible = False
Me.Results6.Visible = False
Else
Me.Deliverable4.Visible = True
Me.Results4.Visible = True
Me.Deliverable5.Visible = True
Me.Results5.Visible = True
Me.Deliverable6.Visible = True
Me.Results6.Visible = True
End If
It works in the AfterUpdate procedure of Deliverable3 while the form still has focus; however, i placed the same code in the OnLoad and OnCurrent events of the form and these same fields disappear and never display again if i move away from the record or close the form. Any idea of how i can get these fields to display when i re-enter the record?
I've already tried changing the Me.Deliverable4.Visible = True
to
Me![Deliverable4]!Visible = True
and i also tried
Me![Deliverable4].Visible = True
and none have worked.
Any assistance is greatly appreciated.
Deliverables 1-35 (text fields)
Results 1-35 (Combo Boxes)
Comments 1-35 (Memo)
All fields are necessary for this form but depending on the circumstances, we may only use a few as oppose to all 35 for any given record. So what i've done is set delveribales 1-3, Results 1-3 and Comment 1-3 to always display and i've set Deliverables 4-35, Results 4-35 and Comments 4-35 to only display if the criteria is satisfied in the VBA code. For example i have Fields 4-6 to display only if Deliverables #3 contains a value.
If IsNull(Deliverable3) Or Deliverable3 = "" Then
Me.Deliverable4.Visible = False
Me.Results4.Visible = False
Me.Deliverable5.Visible = False
Me.Results5.Visible = False
Me.Deliverable6.Visible = False
Me.Results6.Visible = False
Else
Me.Deliverable4.Visible = True
Me.Results4.Visible = True
Me.Deliverable5.Visible = True
Me.Results5.Visible = True
Me.Deliverable6.Visible = True
Me.Results6.Visible = True
End If
It works in the AfterUpdate procedure of Deliverable3 while the form still has focus; however, i placed the same code in the OnLoad and OnCurrent events of the form and these same fields disappear and never display again if i move away from the record or close the form. Any idea of how i can get these fields to display when i re-enter the record?
I've already tried changing the Me.Deliverable4.Visible = True
to
Me![Deliverable4]!Visible = True
and i also tried
Me![Deliverable4].Visible = True
and none have worked.
Any assistance is greatly appreciated.