Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to input URL address into a text box ?

Status
Not open for further replies.

Johnweida

MIS
Apr 29, 2003
91
CN
experts,

I want to input a URL address like 120.9.12.0 or 120.99.1.130 in a text box.How can I do it ? I tried it by set the InputMask and Format property but failed. How can I do it(Not by mouse but by Tab key or cursor key) ? Thanks.

John Satellite
 
John

The problem with presetting the InputMask (which is the one you would set) would require you to pre-determine the format prior to inputting the data (which is I presume impossible) and also you would need to use a character field to account for the "." (periods).

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Dear Mike,

Have you any better way to do it ?

John Satellite
 
John

I assume you cannot depend on the user to put the dots in the right place. No, I do not have a simple solution, since the international format of IP addresses is not the same everywhere, its like a telephone number around the world is not the same.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Just use 4 text boxes. It may not be as pretty, but it would work. Then ALLTRIM() and concatonate them with a '.'.
Code:
WITH THISFORM
   cAddress = ;
     ALLTRIM(.Text1) + '.' + ;
     ALLTRIM(.Text2) + '.' + ;
     ALLTRIM(.Text3) + '.' + ;
     ALLTRIM(.Text4) 
ENDWITH

-Dave S.-
[cheers]
Even more Fox stuff at:
 
Dear Mike,DSummZZZ,

I have found a OCX control named IPocx.OCX. It looks like a text box in a form and can input IP address easily. user can input IP address just using Tab key to move cursor. I'll send it to you by Email if you are interesting in it.
Thanks for your help.

Yours ever
John Satellite
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top