-
Hello,
I have a textbox that bounded to the field called Email(Access 97 table). The field Email contains a line of text "SMTP:[email protected]%X400:c=US".
My question is: Is it possible to have the texbox to populate only partial of the contain in the field Email "[email protected]"?
Thank you in advance
-
You could hide the bound text field, create an un-bound field and place it directly on top of the hidden field and then, in code, move/format the data to the unbound field
-
Hi JHausmann,
Can you please give a sample(code) how to move/format the data to the unbound field.
Thank you.
-
Using the example you provided, you'd want to :
dim sTemp as string
dim sTemp2 as string
sTemp = form.boundfield.text
'get rid of prefix, if it always starts with "SMTP:"
sTemp2 = right(sTemp,len(sTemp)-5)
'get rid of suffix, if it always starts with "%"
sTemp = sTemp2
if instr(1,sTemp2,"%") > 0 then
sTemp = left(sTemp2,instr(1,stemp,"%")-1)
end if
'set the value in the un-bound field
form.unboundfield.text=sTemp
-
Thank you very much for your help JHausmann