The code below expects the user to input a valid project code which is in the PM000XXX format. What I am trying to do is allow the user to either enter the full project code or the last three digits as the first five digits are the same. I know you would need to test what has been input and if it is the last three digits concatenate it with the first 5 before passing to query.
Can someone point in the right direction?
Thank you in advance
Can someone point in the right direction?
Thank you in advance
Code:
MyVariable = InputBox("Please Enter The Clarity Project Number.", "Project Input")
If IsNull(MyVariable) = True Or MyVariable = "" Then
MsgBox "Please Enter A Valid Clarity Project Ref (PM000XXX).", vbCritical