Jul 29, 2004 #1 pctest Programmer Joined Apr 12, 2004 Messages 89 Location US If an inputmask is XX.XXX.XXX but I don't wan't the '.' to be saved if nothing is entered, how to do it? Thank you for any help.
If an inputmask is XX.XXX.XXX but I don't wan't the '.' to be saved if nothing is entered, how to do it? Thank you for any help.
Jul 29, 2004 #2 omr1119 Programmer Joined Oct 7, 2003 Messages 34 Location PH pctest, try this. if substr(m.var,1,2)=" " repl m.var with " " else insert into alias() from memvar endif Upvote 0 Downvote
pctest, try this. if substr(m.var,1,2)=" " repl m.var with " " else insert into alias() from memvar endif
Jul 30, 2004 #3 DSummZZZ Programmer Joined Oct 24, 2000 Messages 4,250 Location US You're going to get an error with this statement: repl m.var with " " But if you have the control bound the field, you may have to bind it to a memory variable instead: Code: IF ALLTRIM(ThisForm.Text1.Value) == ". ." m.var = Chrtran('ThisForm.Text1.Value', '.', '') REPLACE MyTable.Field WITH m.var ENDIF Or you may need to create a trigger to handle the conversion. -Dave Summers- Even more Fox stuff at: http://www.davesummers.net/foxprolinks.htm Upvote 0 Downvote
You're going to get an error with this statement: repl m.var with " " But if you have the control bound the field, you may have to bind it to a memory variable instead: Code: IF ALLTRIM(ThisForm.Text1.Value) == ". ." m.var = Chrtran('ThisForm.Text1.Value', '.', '') REPLACE MyTable.Field WITH m.var ENDIF Or you may need to create a trigger to handle the conversion. -Dave Summers- Even more Fox stuff at: http://www.davesummers.net/foxprolinks.htm
Jul 31, 2004 #4 Mike Lewis Programmer Joined Jan 10, 2003 Messages 17,516 Location Scotland Am I missing something here? Why not just put "R" in the Format property? Mike Mike Lewis Edinburgh, Scotland My Visual Foxpro web site: http://www.ml-consult.demon.co.ukMy Crystal Reports web site: http://www.ml-crystal.com Upvote 0 Downvote
Am I missing something here? Why not just put "R" in the Format property? Mike Mike Lewis Edinburgh, Scotland My Visual Foxpro web site: http://www.ml-consult.demon.co.ukMy Crystal Reports web site: http://www.ml-crystal.com