Subject Re: comment :creating unique key : usingprimair key and foreign key
From Dirk <dirk.cardoen1@gmail.com>
Date Wed, 3 Feb 2021 10:23:16 +0100
Newsgroups dbase.getting-started

  hello

  for npw solved with a temp query and coping the unique key in the
table if it's the best solution, i don't know, the only i kno is that
all ways go to Rome

      a saying here in Europ, used sinces the romans : their Heerweg
       ( heirweg) all went to Rome
   for the german speaking people reading it
      i think the word Heer used for Armee is originate of Heerweg, i
suppose

best regards

Dirk,


Op 1/02/2021 om 14:55 schreef Dirk:
> Good day,
>
> to collect information about all kind of articles and product i use the
> following ( a main tabble and a child table)
>
>   by query
>   the main tabel get a unique nr and main information, this info putted
> aswell in the child table :
>
> the child table follows the main table as usual way..
>
> the child table get his own unique nr as done by : see below:
>
> because of using the indexname of the child query, i can not vome back
> to the main query, meaning the child query doesn't follow the main query
> anymore ..
>
> once using the child query thers is no probleme to add or modify the info
>
> but creating a new record i have to restart the programm
>
> the watch is the index
>
> does someone have a hint
>
> Thanks
>
> Dirk Cardoen,
>
>
>
>
>       function KNOP_CROSSBIJVOEG_onClick()
>        local crossK,crossOpslaan
>            crossOpslaan =
> this.parent.parent.vraagbak_crossen.rowset.indexname
>             this.parent.parent.vraagbak_crossen.rowset.indexname =
> "ivolgID"
>           if this.parent.parent.vraagbak_crossen.rowset.endoFset
>             crossK = "0000000001"
>           else
>            this.parent.parent.vraagbak_crossen.rowset.last()
>            crossK=
> str(val(this.parent.parent.vraagbak_crossen.rowset.fields["eigenvolgnr"].value)+1,10,0,"0")
>
>           endif
>             this.parent.parent.vraagbak_crossen.Rowset.IndexName =
> crossOpslaan
>              this.parent.parent.vraagbak_crossen.rowset.beginappend()
>
> this.parent.parent.vraagbak_crossen.rowset.fields["eigenvolgnr"].value
> =crossK
>
> this.parent.parent.vraagbak_crossen.rowset.fields["crossingavedatum"].value
> = date()
>
> this.parent.parent.vraagbak_crossen.rowset.fields["crossvolgnr"].value =
> this.form.rowset.fields["volgnr"].value
>                form.keuzedoos_crossfirma.datalink =
> this.parent.parent.vraagbak_crossen.rowset.fields["crossleverancierId"]
>               form.keuzedoos_crossmerk.datalink  =
> this.parent.parent.vraagbak_crossen.rowset.fields["crossbrandnr"]
>              form.keuzedoos_crossprod.datalink =
> this.parent.parent.vraagbak_crossen.rowset.fields["crossproductnr"]
>            form.keuzedoos_crosseenheid.datalink =
> this.parent.parent.vraagbak_crossen.rowset.fields["crosseenheid"]
>      class::crosskleuren(null)
>     return
>     *****