Code Snippet Details

<- Back to List


Language
VBA
Description
Status Messages class
Code
'======================================================================================================================= ' Module: StatusMessages ' Purpose: Common logic for raising status messages in the domain layer. ' Notes: This is a class so that it can raise status events without accessing the status bar directly. '======================================================================================================================= Option Compare Database Option Explicit Private Const ModuleName As String = "StatusMessages" Public Event StatusChanged(ByVal pMessage As String) Public Sub SetStatus(ByVal pMessage As String) RaiseEvent StatusChanged(pMessage) End Sub Public Sub ClearStatus() RaiseEvent StatusChanged("") End Sub