Re: Grid event code content disappears after recordsource changed
- From: "Juan Alonso" <john@xxxxxxxxxxx>
- Date: Thu, 12 Jun 2008 09:06:53 -0400
Ok man.
Let me get this straight.
Your code inside the grid vanishes when you change the recordsource?
I have both LIST BOXES and GRIDS that I do tha same with and never have a
problem.
I use VFP 8 SP1 and all hotfixes..
I think you should change where you are putting your RECORDSOURCE change
from the Init to the Activate and this should fix your problem.
What I believe is happening to you is that the Class for the grid is
re-creating a new grid because of the change in RECORDSOURCE being in the
Init. The Init occurs at the form creation time while the Activate occurs
after all the Properties of the Form are created. In other words you are
creating a change to a Form that is the process of being created instead of
one that is already created.
I could be wrong and it just be a behavior you personally are experiencing
but I am pritty sure, that is what is happening.
Good luck,
Johnny.
"kcs" <kcsemail2001@xxxxxxxxx> wrote in message
news:d63d9c64-7281-44e7-832a-912bb658a1a9@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a form with a grid, which contains code for specific events
called while the grid is being used. When the form is started, I
change the grid's recordsource in the form's init event to a table
established within this init event. When I change the recordsource for
this grid to this new table, all the code for events I previously
placed in the grid is no longer accessible. How can I fix this? Is
there a way to replace the event code after the new recordsource is
established? I am so used to using the project designer, I am not sure
how to do this.
Thanks.
.
- Prev by Date: Re: How to ask user to enter password before changing anything?
- Next by Date: Re: applying a VCX to an existing form
- Previous by thread: How to ask user to enter password before changing anything?
- Next by thread: Re: applying a VCX to an existing form
- Index(es):
Relevant Pages
|