Results 1 to 5 of 5

Thread: Text box question

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Edmonton,AB,Canada
    Posts
    28
    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



  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    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

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Edmonton,AB,Canada
    Posts
    28
    Hi JHausmann,

    Can you please give a sample(code) how to move/format the data to the unbound field.

    Thank you.


  4. #4
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    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

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Feb 2000
    Location
    Edmonton,AB,Canada
    Posts
    28
    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
  •  



Click Here to Expand Forum to Full Width