A family of Microsoft relational database management systems designed for ease of use.
So apparently your switchboard isn't always the active form, even when it appears to be. Does the problem occur when only the switchboard form is open? Is there any open form, visible or not, that has a Timer event running?
How are you trapping the pressing of the F1 key? Is it by an autokeys macro, or the form's KeyDown event, or something else?
I suppose you might try a code loop to attempt to get the active form if something is intermittently stealing the focus. It could loop for a fraction of a second until it has an active form; something like this:
'----- start of code -----
Function GetActiveForm() As Access.Form
Dim frm As Access.Form
Dim lngTimerValue As Long
On Error Resume Next
lngTimerValue = Timer
Do
Set frm = Screen.ActiveForm
If frm Is Nothing Then
DoEvents
' Exit loop if more than a tenth of a second has gone by
If Timer - lngTimerValue > 0.1 Then Exit Do
End If
Loop Until Not frm Is Nothing
Set GetActiveForm = frm
End Function
'----- end of code -----