Subject Re: how to place an index on this form
From agostinho <agostinhoteixeira@yahoo.com>
Date Fri, 18 Sep 2020 22:48:32 -0400
Newsgroups dbase.getting-started

Sorry that on my form I missed the table that I added from the inspector onto the brows object.
I know there are better ways to do this but I just want to make an experiment.
I will be more than thankful if  I  get help from the group, if not than I will
try from other sources.
Thanks

** END HEADER -- do not remove this line
//
// Generated on 09/18/2020
//
parameter bModal
local f
f = new NOBROWSForm()
if (bModal)
   f.mdi = false // ensure not MDI
   f.readModal()
else
   f.open()
endif

class NOBROWSForm of FORM
   with (this)
      height = 16.0
      left = 26.7778
      top = 1.32
      width = 73.2222
      text = ""
      view = "VERW_OUD.DBF"
   endwith

   this.BROWSE1 = new BROWSE(this)
   with (this.BROWSE1)
      height = 10.08
      left = 3.0
      top = 4.8
      width = 65.0
      alias = "VERW_OUD"
   endwith

   this.ENTRYFIELD1 = new ENTRYFIELD(this)
   with (this.ENTRYFIELD1)
      onKey = class::ENTRYFIELD1_ONKEY
      height = 2.4
      left = 3.0
      top = 0.48
      width = 29.0
      value = ""
   endwith

   function ENTRYFIELD1_onKey(nChar, nPosition,bShift,bControl)
           ccode=form.entryfield1.value
                seek ccode
      return

endclass




Ken Mayer Wrote:

> On 9/18/2020 11:34 AM, agostinho wrote:
> > Dear group see this form bellow, it's a very simple one.
> > I'm trying to place an index (INDEXNAME="KCODE" on the form to make it work.
> > I got the alias database.dbf option on the INSPECTOR  but I don't see any option for index option.
> > If this is not possible from the inspector than how/where on the form him self.
>
> It helps if you learn to use the data objects in dBASE, that way you
> have the control you're looking for. Where exactly are you opening the
> table? It's not being opened by the form itself. Are you doing it in a
> program? If so, in the program you need to add the index:
>
> use tablename order kcode
>
> Then call the form, and it should be indexed.
>
> If you use the data objects, you have to place a query object on the
> form, the simplest way is, in the Form Designer, go to the navigator,
> click on the tables tab, and drag the table to the form. Then you could
> set the index using the rowset's indexName property ...
>
> I really suggest that if you're going to use current versions of dBASE
> you consider the (free) tutorial in my link signature block below ...
>
> 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