In your comboVendor, you allow a value of Null which results in an error. I would not allow user to select a null (I'd force a selection)
But there may be circumstances with your set up/business that I am not aware of or haven't understood.
I added a few lines of code that may be helpful.
Code:
Private Sub comboVendor_AfterUpdate()
Dim VendorID As String
Dim currentwin As String
currentwin = "frmEditVendor"
If IsNull(Me.comboVendor) Then
MsgBox "You must select a valid vendor", vbOKCancel, "NoVendorSelected"
Exit Sub
End If
VendorID = DLookup("Vendor", "tblVendor", "Vendor='" & Me.comboVendor & "'")
' If they must select a valid vendor, then don't allow a null option
If VendorID = "" Then
MsgBox ("There is not a Matching Vendor Name!")
DoCmd.OpenForm "frmMainSwitchBoard"
DoCmd.Close acForm, currentwin
Else
DoCmd.OpenForm "frmEditVendor2", , , "Vendor='" & VendorID & "'"
DoCmd.Close acForm, currentwin
End If
End Sub