aşağıdaki kod satırlarını deneyiniz.
Kod:
Private Sub nameid_Click()
On Error GoTo Error_Trap
Select Case Me.dt_code
Case "BCG","BCK","MKR","MTG"
DoCmd.OpenForm "frmDetay", acNormal, , Me.ActiveControl.ControlSource & "=" & Me.ActiveControl, acFormEdit, acDialog
Case "BTG","BTK"
DoCmd.OpenForm "frmDetay2", acNormal, , Me.ActiveControl.ControlSource & "=" & Me.ActiveControl, acFormEdit, acDialog
End Select
Error_Trap:
MsgBox ("Error Code:" & Err.Number & " Error Description:" & Err.Description)
End Sub