Veli Izzet said:
I want to view/hide the Notes (Memo field) of a record in a pop-up window
using a toggle button, when I am in a form.
How do I write the code?
Hi Veli,
PMFBIA
Here are 2 examples from some of
my databases that use a different method:
1) textbox control "txtMsgBody" (and its label "lblMsg")
(bound to memo field)
Private Sub cmdToggleMsg_Click()
txtMsgBody.Visible = Not txtMsgBody.Visible
lblMsg.Visible = Not lblMsg.Visible
End Sub
2) subform container "contSubActualEnr"
Private Sub cmdToggleSubForm_Click()
Me!contSubActualEnr.Visible = Not Me!contSubActualEnr.Visible
Me!contSubActualEnr.Enabled = Not Me!contSubActualEnr.Enabled
If Me!contSubActualEnr.Visible = True Then
Me!contSubActualEnr.SourceObject = "frmSubActualEnr"
Else
Me!contSubActualEnr.SourceObject = ""
End If
End Sub
In the case of the container for the subform,
the data it displayed was only needed at certain
times in the business cycle, and the subform used
so much conditional formatting, that it sped up
the main form by hiding AND unbinding the container
when not needed (but VERY helpful that one time
in the process when they needed to see it).
Apologies again,
gary