Information générale
Catégorie:
Codage, syntaxe et commandes
If you put your code into Page.activate, then it will recreate the table each time the page is activated. Think whether it is what you actually need.
Now to your question. You need to force the grid to accept a new RecordSource. Something like:
thisform.pageframe1.page2.grid1.RecordSource="c:\temp_codes.dbf"
Be prepared that this line will reformat the headres and columns of the grid!
Another alternative is to create a query as RecordSource. This query could be actually the program where you create the table.
>Hello all..
>
>I'm using 5.0 and creating a page frame with 2 frames. On page2, I have a grid pointing to c:\temp_codes table. In the activate event on Page2, I'm creating c:\temp_codes table. However, the grid never shows the table. It either is an empty rectangle or an empty grid. After I've created the table, i've tried:
> thisform.refresh
> thisform.pageframe1.refresh
> thisform.pageframe1.page2.refresh
> thisform.pageframe1.page2.grid1.refresh
>
>Nothing updates the grid. I've also tried having the grid look at an existing table and it still didn't work. Any ideas?
>
>Thanks,
>Sunshine
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement