if checkbox is yes, message appears in form

softsupport
softsupport used Ask the Experts™
on
I have a checkbox in a form.  if the checkbox is yes, want a message box to read "This customer is overdue" in a subform.  Is this possible/>
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Distinguished Expert 2017
Commented:
"subform" implies that there will be multiple records.  Why would the overdue message appear on each subform record?  Shouldn't it appear on the main form?

To make it appear on the main form, add a new unbound control and name it "txtMsg"

In the Current event of the form:

If Not Me.NewRecord then
    If Me.chkOverdue = True Then
        Me.txtMsg = "This customer is overdue."
    Else
        Me.txtMsg = null
End If

Author

Commented:
ok.... perhaps not stating properly.  the checkbox field is one form and the message should appear in another.  So if the checkbox is in the customer form, I would like the message to appear in the orders form to alert data entry of this customers status.... overdue.

Author

Commented:
Correction..... you are correct..... got it to work.   Thank you
Distinguished Expert 2017

Commented:
You're welcome.  Glad I could help.
Distinguished Expert 2017

Commented:
The poster thanked me for the answer.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial