Hi All,
I have been using a the below code on double click to open a form to a specific record:
Private Sub Internal_Unit_Code_DblClick(Cancel As Integer)
DoCmd.OpenForm "AdminPrecedentDetails", , , "[External Unit Code] = '" & Me.External_Unit_Code & "'"
End Sub
This was working fine, however I now have duplicate External Unit Codes so this code will no longer work.
I would like to change the code to look at the field "UnitEquivalence_ID" However I keep getting the following error when I change the code:
Run-Time error '3464':
Data type mismatch in criteria expression
The UnitEquivalence_ID field is an autonumber, would this be causing the error ?
If so is there a different code that can be used ?
Any help would be greatly appreciated.
I have been using a the below code on double click to open a form to a specific record:
Private Sub Internal_Unit_Code_DblClick(Cancel As Integer)
DoCmd.OpenForm "AdminPrecedentDetails", , , "[External Unit Code] = '" & Me.External_Unit_Code & "'"
End Sub
This was working fine, however I now have duplicate External Unit Codes so this code will no longer work.
I would like to change the code to look at the field "UnitEquivalence_ID" However I keep getting the following error when I change the code:
Run-Time error '3464':
Data type mismatch in criteria expression
The UnitEquivalence_ID field is an autonumber, would this be causing the error ?
If so is there a different code that can be used ?
Any help would be greatly appreciated.