The code you posted simply set the value of the editbox and it did NOT change the controlsource. Because of this as soon as the editbox gets focus it will refresh its display from the controlsource it had BEFORE your code assigned the value property. Your code need to assign to the controlsource property and then refresh the editbox.