N
noodnutt
G'day ppl
I never seem to be able to get the ol' "if, then" into proper context, now I
know I can simplify this by having the user type in the data, but for
reasons of aestetics & convenience I am trying this, so here's the problem:
Private Sub Btn1_Click()
If Me.Drawn1 = 0 Then
Me.Drawn1 = 1
Else
If Me.Drawn1 > 0 Then
Me.Drawn2 = 1
Else
If Me.Drawn2 > 0 Then
Me.Drawn3 = 1
Else
If Me.Drawn3 > 0 Then
Me.Drawn4 = 1
Else
If Me.Drawn4 > 0 Then
Me.Drawn5 = 1
Else
If Me.Drawn5 > 0 Then
Me.Drawn6 = 1
Else
If Me.Drawn6 > 0 Then
Me.Sup1 = 1
Else
If Me.Sup1 > 0 Then
Me.Sup2 = 1
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
What this should do is that if Drawn1 has no value then it will = 1, else if
it already has a value then goto the next and so on.
I tried using an option group, but that didn't work either, and I'm not
quite sure a CaseSelect is relavent here or not, so here I am "AGAIN",
relying on those I know who will set me straight, looking forward to your
taunts & jibes, oh, and possibly your suggestions.
TIA
Reg's
Mark
I never seem to be able to get the ol' "if, then" into proper context, now I
know I can simplify this by having the user type in the data, but for
reasons of aestetics & convenience I am trying this, so here's the problem:
Private Sub Btn1_Click()
If Me.Drawn1 = 0 Then
Me.Drawn1 = 1
Else
If Me.Drawn1 > 0 Then
Me.Drawn2 = 1
Else
If Me.Drawn2 > 0 Then
Me.Drawn3 = 1
Else
If Me.Drawn3 > 0 Then
Me.Drawn4 = 1
Else
If Me.Drawn4 > 0 Then
Me.Drawn5 = 1
Else
If Me.Drawn5 > 0 Then
Me.Drawn6 = 1
Else
If Me.Drawn6 > 0 Then
Me.Sup1 = 1
Else
If Me.Sup1 > 0 Then
Me.Sup2 = 1
End If
End If
End If
End If
End If
End If
End If
End If
End Sub
What this should do is that if Drawn1 has no value then it will = 1, else if
it already has a value then goto the next and so on.
I tried using an option group, but that didn't work either, and I'm not
quite sure a CaseSelect is relavent here or not, so here I am "AGAIN",
relying on those I know who will set me straight, looking forward to your
taunts & jibes, oh, and possibly your suggestions.
TIA
Reg's
Mark