プロシージャ名 | 顧客ID_DblClick |
---|
Private Sub 顧客ID_DblClick(Cancel As Integer) On Error GoTo Err_顧客ID_DblClick Dim lngCustomerID As Long If IsNull(Me![顧客ID]) Then Me![顧客ID].Text = "" Else lngCustomerID = Me![顧客ID] Me![顧客ID] = Null End If DoCmd.OpenForm "顧客マスター", , , , , acDialog, "GotoNew" Me![顧客ID].Requery If lngCustomerID <> 0 Then Me![顧客ID] = lngCustomerID Exit_顧客ID_DblClick: Exit Sub Err_顧客ID_DblClick: MsgBox Err.Description Resume Exit_顧客ID_DblClick End Sub