Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Alias cannot be found when using views
Message
De
18/06/2002 19:05:24
 
 
À
18/06/2002 17:15:43
Angela Haws
Seminole County Tax Collector
Debary, Floride, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00669725
Message ID:
00669940
Vues:
19
Hello Angie,

I hope you don't mind me jumping in here...

Are you finding that you need to open the database for the nav button to work? The OPEN DATABASE command should not be necessary, unless something somewhere is closing it. And if that is the case, you need to find why that is happening and resolve the issue. The same thing goes with your "USE vowner" line. Why is the view closing? I really think you should hunt down the root problem. Hilmar's suggestion to set a breakpoint on a change in used("vowner") might be helpful.

Also, I noticed you have an OPEN DATABASE command in your form's init() method. You should not need the command there either.

Here is a slightly shorter version, but I left in the USE vowner statement. Putting the code inside of HTML < pre> and < /pre> (without the spaces) preserves code formatting.
lc_CustID = Thisform.custnum
If !Used('Vowner')
    use vowner in 0  && if this line executes, I think something is wrong...
                     &&     and navigation would be quirky.  You would end up on
                     &&     the second record no matter where you were before
                     &&     this button was pressed...
endif
If !Eof('vowner')
    Skip in vowner
    If Eof('vowner')
        Skip -1 in vowner
    Endif
    Thisform.Refresh()
Else
	Messagebox("End of File")   && this line of code should never execute
Endif
>The Component Gallery is where I got the nav button. I was able to get the view to work, making sure I didnt "use" or "select" another table...
>
>Here's what I put in the "Next" Nav button
>
>Open Database Occdata
>lc_CustID = Thisform.custnum
>If !Used('Vowner')
> Select 0
> Use vowner
>Else
> Select vowner
>Endif
>If !Eof()
> Skip
> If Eof()
> Skip -1
> Endif
> Thisform.Refresh()
>Else
> Messagebox("End of File")
>Endif
>
>Thank you for everyone's help!
Steve Gibson
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform