Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Search and SET RELATION don't like each other
Message
 
 
À
02/05/2001 16:51:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Divers
Thread ID:
00502705
Message ID:
00502765
Vues:
15
>Nadya,
>
> Off the top of my head...
>
> When setting up your data environment (e.g. in Load event), do the following:
>
Hi Jay,

I don't understand, how the grdLender will show the correct info in this case. RecordSource for grdLender is Lender, not Lender2. Did you mean to re-set RecordSource for the grdLender to Lender2 for a moment? I can try this + Vlad's trick about avoiding reconstruction, but it seems quite complicated. Why simple set relation to doesn't work?

>
>USE Lender AGAIN ALIAS Lender2 IN 0
>
>
>
>Then, in LendRev.Search()
>
>local lnRecno
>lnRecno=recno('Lender2')
>thisform.DataEnvironment.InitialSelectedAlias="Lender2" && Search form uses this property
>dodefault()
>thisform.DataEnvironment.InitialSelectedAlias="BldMstr" && Restore it back
>
>
>This is the code in AfterRowColChange for BldMstr grid:
>
>
>LPARAMETERS nColIndex
>local lnRecno
>lnRecno=recno('BldMstr')
>with this
>   .parent.GrdHglt1.Highlight_Row()
>   .statusbartext=space(20)+"Record "+ ;
>	transform(m.lnRecno)+ ;
>	" of "+transform(thisform.NumberOfRecords)+' in '+alias()
>endwith
>thisform.navstand.navupdate()
>
>
>This suggestion is simply to "keep it simple." By using 2 separate "views" of Lender -- you can use 1 for searching and the other for viewing without having to set up for one or the other. That should avoid the problem of the table being in the incorrect state for the desired operation.
>
>Jay
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform