Chey,
You mean on the same main form record? So we have this scenario...
You have a comment entered.
This comment is entered/accessed via a subform.
This subform is hidden unless you say Yes to the "add a comment" message
box.
Now you want that if you say No to the "add a comment" message box, any
previous message is deleted - but the previous message is still hidden
because the subform is still Visible=No.
Is this correct?
Well, it seems to me you will need to use an Update Query to remove the
comment. I guess one approach in code is something like this...
If MsgBox("Add a comment?", vbQuestion+vbYesNo) = vbNo Then
CurrentDb.Execute "UPDATE YourSubformTable SET Comment = Null
WHERE SubFormID=" & YourID
DoCmd.OpenReport "YourReport"
Else
Me.NameOfSubform.Visible = True
End If
I am pretty much shooting in the dark here because I don't know anything
about the tables behind your form and subform, and the relationship
between them.