Private Sub Command26_Click()
If Me.违法主体 = "个人" Then
If Not IsNull(DLookup("[案件序号]", "个人", "[案件序号] = '" & Me.案件序号 & "'")) Then
DoCmd.OpenForm "个人资料", , , "[案件序号] = '" & Me.案件序号 & "'"
Else
DoCmd.OpenForm "个人资料"
DoCmd.GoToRecord , , acNewRec
End If
ElseIf Me.违法主体 = "单位" Then
If Not IsNull(DLookup("[案件序号]", "单位", "[案件序号] = '" & Me.案件序号 & "'")) Then
DoCmd.OpenForm "单位资料", , , "[案件序号] = '" & Me.案件序号 & "'"
Else
DoCmd.OpenForm "单位资料"
DoCmd.GoToRecord , , acNewRec
End If
End If
End Sub
Private Sub Command26_Click()
If Me.违法主体 = "个人" Then
If Not IsNull(Dlookup("[]","个人资料表","[表内某字段]='"&me.某对象&"'" then
DoCmd.OpenForm "个人资料"
Else
打开输入窗
End If
ElseIf Me.违法主体 = "单位" Then
If Not IsNull(Dlookup("[]","单位资料表","[表内某字段]='"&me.某对象&"'" then
DoCmd.OpenForm "单位资料"
Else
打开输入窗.....
End If
End If
End Sub