I KNEW it was simple.
Thanks Jed. This has been bugging me for ages. I didn't quite click that
yo uhad to create a property.
Steve
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Friday, 22 June 2001 16:36
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Passing a variable to a form
Hi,
Create a public property on the form
property NoteID: String read FNoteID write SetNoteID;
in the SetNodeID procedure do the query you run in FormCreate in the
SetNodeID procedure.
call it like:
Application.CreateForm(TNoteForm, NoteForm);
NoteForm.NodeID := DBGrid2.SelectedField.asString;
NoteForm.ShowModal;
HTH,
JED
>>What I want to do is open a form with and pass it the ID of a record from
a
>>table so that it will show only that record.
**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the [EMAIL PROTECTED]
**********************************************************************
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"