Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Gridlock
Message
De
08/07/1998 16:06:00
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Gestionnaire d'écran & Écrans
Titre:
Divers
Thread ID:
00114878
Message ID:
00115456
Vues:
13
>I have a grid, made by hand since the table it uses has a variable name. I set all the column control sources to the parts of the table I want in the grid. When I run the form, nothing shows up in the grid.
>
>I went back and tried setting the grid's record source to the table alias. Now I have a filled grid, but it fills it in field order and ignores my control sources.
>
>This has happened before and I managed to fix it with a lot of playing, but I don't know what I did that fixed it and I'm short on time now. So if anyone can tell me how to fix it, I'd really appreciate it.

I assume all your tables have the fields mentioned in the grid (one wrong move and the grid will reset to default - all fields). Just issue the same alias (TheAlias in my example), and then, when you open the table,

use (lcTheTableName) alias TheAlias

Just take care not to do this while the grid lives, because it will lose recordsource while you reopen the table, and reset again. I've done a grid like that, and ended up having a cursor with the structure identical to the structure of the tables used (and they're sure to have identical structures - they're .scxes :), and then actually filled the cursor with records from the table (and a link field where recno() of the original table is stored). When I reopen the table (i.e. switch to another .scx) I blank all the records in the cursor, and refill from the table. I do filter blank records, but for such small tables that's no overhead.

Actually, this is simply crying out for a view, if it can be done. Really, is it possible to create a view on a table with variable name?

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform