Are you aware you have surplus spaces in your strings? That could begiving you problems. Your code will run fine if you strip out the spacesand put it instead in the AfterUpdate event of the text box.