|
-
Jul 27th, 2000, 11:07 AM
#1
Thread Starter
Junior Member
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
-
Jul 27th, 2000, 11:22 AM
#2
Frenzied Member
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
-
Jul 27th, 2000, 12:11 PM
#3
Thread Starter
Junior Member
Hi JHausmann,
Can you please give a sample(code) how to move/format the data to the unbound field.
Thank you.
-
Jul 27th, 2000, 12:41 PM
#4
Frenzied Member
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
-
Jul 27th, 2000, 06:36 PM
#5
Thread Starter
Junior Member
Thank you very much for your help JHausmann
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|