| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- Option Compare Database
- Option Private Module
- Option Explicit
- Dim p_SilentMode As Boolean
- Public Sub activate_SilentMode()
- p_SilentMode = True
- End Sub
- Public Function SilentMode_activated() As Boolean
- SilentMode_activated = p_SilentMode
- End Function
- Public Function OA_MsgBox(ByVal msg As String, Optional ByVal buttons As Long, Optional title As String) As Integer
- If Not p_SilentMode Then
-
- OA_MsgBox = MsgBox(msg, buttons, title)
-
- Else
-
- logger "OA_MsgBox", "INFO", title & " - " & msg
-
- While buttons >= 16
- buttons = buttons - 16
- Wend
-
- Select Case buttons
- Case vbOKOnly
- OA_MsgBox = vbOK
- Case vbOKCancel
- OA_MsgBox = vbOK
- Case vbAbortRetryIgnore
- OA_MsgBox = vbIgnore
- Case vbYesNoCancel
- OA_MsgBox = vbYes
- Case vbYesNo
- OA_MsgBox = vbYes
- Case vbRetryCancel
- OA_MsgBox = vbCancel
- End Select
-
- logger "OA_MsgBox", "DEBUG", "Silent mode: OA_Msgbox returned " & OA_MsgBox
- End If
- End Function
- Public Function prompt_for_export_confirmation(ByVal newer_only As Boolean) As Boolean
- Dim msg As String
-
- msg = "**** OPENACCESS EXPORT ****" & vbNewLine & _
- "You're going to export the following:" & vbNewLine & vbNewLine & _
- msg_list_to_export(newer_only) & _
- ""
-
- prompt_for_export_confirmation = (OA_MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK)
-
- End Function
- Public Function prompt_for_import_confirmation() As Boolean
- Dim msg As String
-
- msg = "**** OPENACCESS IMPORT ****" & vbNewLine & _
- "You're going to update " & UCase(CurrentProject.name) & " with the sources files" & vbNewLine & vbNewLine & _
- "WARNING: Any non exported work would be lost!"
- prompt_for_import_confirmation = (OA_MsgBox(msg, vbOKCancel + vbExclamation, "Confirm") = vbOK)
-
- End Function
|