Make it Beep

  • Thread starter Thread starter mikepage5
  • Start date Start date
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
 
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.
 
Back
Top