Farouk,
Programs do not have datasessions so you are affecting the entire form when you change the datasession here. Because the datasession changes, the recordsource of the grid is no longer available and you see the results.
I would recommend using a session object to handle this stuff. Creating a session object would create a datasession barrier between it and the form. Internal to the session object, you could change datasession , requery and change back (optional). This shouldn't affect your form at all.
HTH.
>Hi all,
>
>I want to accomplish the following. In the click of the button, I want to call a prg. The form is in Private Data Session. In the prg, I'm doing this :
>
>lnDS = SET("DATASESSION")
>SET DATASESSION TO
>........ && open other views and requery...
>........
>........
>........
>........
>
>
>SET DATASESSION TO (lnDS)
>
>Is there anything wrong with the above? The weird thing is I see all the records in the grid dissappeared..
>
>Regards.
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao