|
用选择的值和B_BA_Z000的栏位同名,请问如何简化
'1
If Me.Combo_流程 = 1 And DLookup("1", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 1 And DLookup("1", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'2
If Me.Combo_流程 = 2 And DLookup("2", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 2 And DLookup("2", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'3
If Me.Combo_流程 = 3 And DLookup("3", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 3 And DLookup("3", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'4
If Me.Combo_流程 = 4 And DLookup("4", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 4 And DLookup("4", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'5
If Me.Combo_流程 = 5 And DLookup("5", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 5 And DLookup("5", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'6
If Me.Combo_流程 = 6 And DLookup("6", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 6 And DLookup("6", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'7
If Me.Combo_流程 = 7 And DLookup("7", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 7 And DLookup("7", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'8
If Me.Combo_流程 = 8 And DLookup("8", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 8 And DLookup("8", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'9
If Me.Combo_流程 = 9 And DLookup("9", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 9 And DLookup("9", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'10
If Me.Combo_流程 = 10 And DLookup("10", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 10 And DLookup("10", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'11
If Me.Combo_流程 = 11 And DLookup("11", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 11 And DLookup("11", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'12
If Me.Combo_流程 = 12 And DLookup("12", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 12 And DLookup("12", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'13
If Me.Combo_流程 = 13 And DLookup("13", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 13 And DLookup("13", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'14
If Me.Combo_流程 = 14 And DLookup("14", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 14 And DLookup("14", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If
'15
If Me.Combo_流程 = 15 And DLookup("15", "B_BA_Z000", "SSNameID= ctNameID") = 2 Then
ElseIf Me.Combo_流程 = 15 And DLookup("15", "B_BA_Z000", "SSNameID= ctNameID") = 1 Then
Else
End If |
|