nuttychick
Registered User.
- Local time
- Today, 09:48
- Joined
- Jan 16, 2004
- Messages
- 84
What to do something that I initally thought would be easy to find out..no such luck!
The code is below and works fine, however I only want the first If to run if the start of the fesibility_code is "0" AND the second digit is not a numeric one.
i.e. Run only if the code is 0AB or 0BB etc. Don't run if the code is 07AA etc.
I have highlighted in red where I need to put this.. but dont know what to use. Is it not going to be as simple as I first thought?
Please can someone help! Thank you!
The code is below and works fine, however I only want the first If to run if the start of the fesibility_code is "0" AND the second digit is not a numeric one.
i.e. Run only if the code is 0AB or 0BB etc. Don't run if the code is 07AA etc.
I have highlighted in red where I need to put this.. but dont know what to use. Is it not going to be as simple as I first thought?
Please can someone help! Thank you!
Code:
MySet.MoveFirst
If Mid(MySet!Feasibility_code, 1, 1) = "0" And
Mid(MySet!Feasibility_code, 1, 2) <> [COLOR="Red"]1 - 9[/COLOR] Then
Prefix = Mid(MySet!Feasibility_code, 1, 1)
Suffix1Num = Asc(Mid(MySet!Feasibility_code, 2, 1)) - 64
Suffix2Num = Asc(Mid(MySet!Feasibility_code, 3, 1)) - 63
Else
Prefix = Mid(MySet!Feasibility_code, 1, 2)
Suffix1Num = Asc(Mid(MySet!Feasibility_code, 3, 1)) - 64
Suffix2Num = Asc(Mid(MySet!Feasibility_code, 4, 1)) - 63
End If