Private Sub nCombo()
'   Method to navigate from combo boxes.

1       On Error GoTo ErrorHandler
    
2       Const conProcName As String = "nCombo()"
3       Dim lstrDisplayName As String
4       lstrDisplayName = DisplayName(mstrMyName, conProcName, mstrThatName)

'10      If mstrFrmThisName Like "" Then
'11          If mstrCboThisName Like "" Then
'15              LogPrint lstrDisplayName & "Start." & DebugLineWrap & _
'                DebugLine("mcboThis.Value", mcboThis.Value)
'18          End If
'19      End If

100     Dim blnFilter As Boolean

110     Dim strCriteria As String
111     Dim strEntity As String
112     Dim strFrmDest As String
113     Dim strPK As String
114     Dim strTopFormName As String

120     Dim varPK As Variant

'       Which criteria:
200     strPK = PKTableDotFieldByEntity(mstrEntity)
210     varPK = mcboThis.Value
220     strCriteria = GetCriterion(strPK, varPK)

'       Having strCriteria, we now can re-evaluate Entity to identify the correct destination form:
230     strEntity = EntityRevised(mstrEntity, strCriteria)

240     strTopFormName = TopForm(mcboThis).Name

'       Which form:
300     If (LenB(strCriteria) = 0) Then             'Blank combo box.
305         strFrmDest = FormCNameByEntity(strEntity)
310     Else                                        'Nonblank combo box.
315         strFrmDest = FormNameByEntity(strEntity)
316         blnFilter = True
319     End If

'       This form:
400     If (strFrmDest = strTopFormName) Then
405         DoCmd.CancelEvent                       'Surrenders focus if the form remains open.
410     Else
'           Close before open to conserve dB "connections", i.e., open dB instances:
415         CloseForm TopForm(mcboThis)
419     End If

700     FormOpenOrRefilter strFrmDest, strCriteria, blnFilter

799     Forms(strFrmDest).SetFocus

ExitProcedure:
'900     LogPrint ExitString(lstrDisplayName)
999     Exit Sub
ErrorHandler:
890     LogPrint ErrorMessage(lstrDisplayName)
899     Resume ExitProcedure
End Sub     'nCombo()