B
BTU_needs_assistance_43
So I discovered that not all my reports will go in order and sometimes they
will end with "a", "b", "c", or "d" instead of just "a". I had a working
program set up to chop off "a" if it was at the end. But now that I have
rewritten it to include more letters, the program still gives an output value
but never chops anything at all off the letter and I'm trying it with both an
If Then Else statement and an If Then Goto Else Goto statement. The program
runs successfully but gives the same wrong output both ways. Is my logic
faulty in this program? Can I not interlace functions like this? What is the
deal!?
IF/THEN/ELSE:
If Right(B62, 1) = "a" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
If Right(B62, 1) = "b" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
If Right(B62, 1) = "c" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
If Right(B62, 1) = "d" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
rst![Total Shot Name] = vShots
End If
End If
End If
End If
IF/THENGOTO/ELSEGOTO
If Right(B62, 1) = "a" Then GoTo CutShort Else GoTo Checkforb
Checkforb: If Right(B62, 1) = "b" Then GoTo CutShort Else GoTo Checkforc
Checkforc: If Right(B62, 1) = "c" Then GoTo CutShort Else GoTo Checkford
Checkford: If Right(B62, 1) = "d" Then GoTo CutShort Else GoTo SameName
CutShort: rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
SameName: rst![Total Shot Name] = vShots
rst.Update
will end with "a", "b", "c", or "d" instead of just "a". I had a working
program set up to chop off "a" if it was at the end. But now that I have
rewritten it to include more letters, the program still gives an output value
but never chops anything at all off the letter and I'm trying it with both an
If Then Else statement and an If Then Goto Else Goto statement. The program
runs successfully but gives the same wrong output both ways. Is my logic
faulty in this program? Can I not interlace functions like this? What is the
deal!?
IF/THEN/ELSE:
If Right(B62, 1) = "a" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
If Right(B62, 1) = "b" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
If Right(B62, 1) = "c" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
If Right(B62, 1) = "d" Then
rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
Else
rst![Total Shot Name] = vShots
End If
End If
End If
End If
IF/THENGOTO/ELSEGOTO
If Right(B62, 1) = "a" Then GoTo CutShort Else GoTo Checkforb
Checkforb: If Right(B62, 1) = "b" Then GoTo CutShort Else GoTo Checkforc
Checkforc: If Right(B62, 1) = "c" Then GoTo CutShort Else GoTo Checkford
Checkford: If Right(B62, 1) = "d" Then GoTo CutShort Else GoTo SameName
CutShort: rst![Total Shot Name] = Left([vShots], Len(vShots) - 1)
SameName: rst![Total Shot Name] = vShots
rst.Update