Subject Re: Reqired fill
From charlie <tm@tc.com>
Date Tue, 01 Jun 2021 15:59:08 -0400
Newsgroups dbase.getting-started

Sorry...  Here is the code:

if len(form.entryfield4.value) < 5
                   msgbox( " Sorry" )
                        form.auctopen1.rowset.fields["locate_a"].value = ""
                endif

Doesn't seem to work.  

Ken Mayer Wrote:

> On 6/1/2021 12:11 PM, Charlie wrote:
> > In a form is there a way to require that all characters are filled out in an string entryfield? For instance I have an entry field that is pictured like this:  99-99   I'd like to require that all four numbers are entered or you would receive a message and the characters would disappear.I tried if len(entryfield) < 5 on change but nothing happens.  Hope I explained this ok.  Appreciate any help.
>
> Show us the code. That's the only way we can tell if what you're doing
> is working ...
>
> You may want to use valid instead ... just a thought. Take a look at the
> information in help for valid for an entryfield.
>
> Ken
>
> --
> *Ken Mayer*
> Ken's dBASE Page: http://www.goldenstag.net/dbase
> The dUFLP: http://www.goldenstag.net/dbase/index.htm#duflp
> dBASE Books: http://www.goldenstag.net/dbase/Books/dBASEBooks.htm
> dBASE Tutorial: http://www.goldenstag.net/dbase/Tutorial/00_Preface.htm
> dBASE Web Tutorial: http://www.goldenstag.net/dbase/WebTutorial/00_Menu.htm