Chat GPT came up with this code:
Code:
Sub CheckRuntimeMode()
If CurrentProject.FileFormat = acRuntime Then
' Your code for .accdr (runtime) mode here
MsgBox "This database is running in .accdr (runtime) mode."
Else
' Your code for regular .accdb (design) mode here
MsgBox "This database is running in design mode."
End If
End Sub
Has anyone run into these kinds of problems with other code that fails in runtime mode?
Are there any modes other than acRuntime that need considering for a more robust Sub?