Newbie Quaestion on Referencing dataset from ShowModal Window
- From: "Michelle Brennan" <mibi222@xxxxxxxxxxx>
- Date: 18 Jan 2006 21:56:33 -0700
I have a form containing an ADO dataset. I want to have a
ShowModal form have access to the parent form's dataset.
Since the modal form is shared among many different parent
forms, I don't want to implement this with USES MyParentForm,
but instead "reference" the parent's dataset object with a
dataset object variable in the modal form.
I tried this:
****** Parent Form
MyModalWindow := TMyModalWindow.Create(Self);
MyModalWindow.MyModalDatasetObject := MyParentDataset;
MyModalWindow.ShowModal;
****** MyModalWindow
Public Declaration
MyModalDatasetObject: TADODataSet;
....
If MyModalDatasetObject.State in [dsInsert, dsEdit] then
Do Something...
Although there are no compilation errors, this approach doesn't
work.. I guess I'm not referencing the parent form's dataset
correctly. Can anyone please give me some sample code to
accomplish this?
Thanks.
.
- Follow-Ups:
- Prev by Date: Add field to ADO Table
- Next by Date: Re: RefreshRecord
- Previous by thread: Add field to ADO Table
- Next by thread: Re: Newbie Quaestion on Referencing dataset from ShowModal Window
- Index(es):
Relevant Pages
|