Hello,
I have a Report that lists a Contact Name field (called "Manager/Supervisor1"). When a user clicks on the "Manager/Supervisor1" field, I want to go directly to that record in the Contact Form.
I have done this before on other fields using the On Click macro with both "OpenForm" and "SetTempVar" and then "Open Form." However, when I try those methods with this field, I receive a comma error because the Contact Name field is in the format "Last Name, First Name."
It is not possible to remove the comma from the Contact Name field at this point in the database. Nor is it possible to change the name of the field.
So, I have tried using a VBA DoCmd. The following code opens the Contact Form like I want, but it does not go to the specific record. Any help would be appreciated!
Dim sWhere As String
sWhere = "[Manager/Supervisor1] = '" & Me.Manager_Supervisor1 & "'"
DoCmd.OpenForm "frmContacts", acNormal, sWhere
End Sub