Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: mohammed qasem
  Where is mohammed qasem?
 amman
 Jordan
 mohammed qasem
 Tags
Subject: RE: EMPTY TEXT
Thread ID: 209409 Message ID: 209469 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Monday, December 29, 2008 7:29:55 AM         
   


You are converting a number into a string. In that case, you may need to change the inputmask to receive only numbers.

Regards
Tushar
> i try it at text Init, it works
>
> IF EMPTY(Thisform.text2.value)
> This.Value = ''
> ELSE
> This.Value = TRANSFORM(Thisform.text2.value)
> ENDIF
> ***
> at valid
> Thisform.text2.value = INT(VAL(This.Value))
>
> >
> > Works for me. Quoted from Help on "Format Property":
> > >>
> > Z
> > Displays the value as blank if it is 0, except when the control has focus.
> > >>
> >
> > If your goal is to hide the zero even even when the textbox has the focus, you may need to do more complicated coding:
> > you can for instance have an empty textbox.ControlSource property and in textbox.Refresh() do something like
> >
> > IF EMPTY(Thisform.nValue)
> > 	This.Value = ''
> > ELSE
> > 	This.Value = TRANSFORM(Thisform.nValue)
> > ENDIF
> > 

> >
> > and in textbox.Valid()
> >
> > Thisform.nValue = INT(VAL(This.Value))
> > 

> >
> >
> > -Stefan

ENTIRE THREAD

EMPTY TEXT Posted by mohammed qasem @ 12/28/2008 1:39:47 PM
RE: EMPTY TEXT Posted by Stefan Wuebbe @ 12/28/2008 1:40:56 PM
RE: EMPTY TEXT Posted by mohammed qasem @ 12/28/2008 1:46:11 PM
RE: EMPTY TEXT Posted by Stefan Wuebbe @ 12/28/2008 2:01:59 PM
RE: EMPTY TEXT Posted by mohammed qasem @ 12/28/2008 2:15:44 PM
RE: EMPTY TEXT Posted by Stefan Wuebbe @ 12/28/2008 3:38:37 PM
RE: EMPTY TEXT Posted by tushar @ 12/29/2008 7:29:55 AM