Make it Beep

M

mikepage5

I want my form to beep when the data in a subform is not
null. I have a parent form which has a subform that will
not always have data in it. When the current record is
viewed and that subform does contain data, I want the
computer to beep. It is a notes section for employees
when they are viewing thier record. I want them to be
alerted with a beep when they have a note. Can someone
please help, Thanks
 
N

Neil

The code for this is DoCmd.Beep, but where to place it is going to be the
key. If the parent form and sub form are linked and the sub form is on the
main form, then you could probably use the main forms current event. e.g.

Private Sub Form_Current()

' Check to see if the sub form is on a new record
If Me.SubformName.Form.NewRecord Then
' Do nothing - no notes
Else
' Beep
DoCmd.Beep
End If

End Sub

HTH,

Neil.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top