Thanks to Punchinello's help, I have created an application that allows multiple instances of the same form (frmJurorInformation). In the OnShow event I have the following code:
(I can't get the DBLookupComboBox to work properly so I'm setting it my self in a regular combo box).
I would like to have this in it's own procedure:
except I can't figure out how to refer to this particular instance of the form! In the OnShow event I can use SELF and it works fine, but when I try to move this to it's own procedure (within the JurorInformation.pas) it doesn't work. I have tried putting the declaration in all kinds of places at the top (implementation, private, public) and always get a unsatisified forward or external declaration.
Anyone give me a clue on how I can implement this? There are a few other procedures that I would like to use, but I'm stuck!
Leslie
Code:
With qryStatus do
begin
SQL.Clear;
SQL.Add('SELECT * FROM JMPSTATUS WHERE STCODE = ' + QuotedStr(qryJurorInformation.FieldByName('STATUSCD').AsString));
Active := true;
cbStatusCodes.Text := FieldByName('STDESC').AsString;
end;
(I can't get the DBLookupComboBox to work properly so I'm setting it my self in a regular combo box).
I would like to have this in it's own procedure:
Code:
procedure SetStatus(AStatusCode : string);
begin
With qryStatus do
begin
SQL.Clear;
SQL.Add('SELECT * FROM JMPSTATUS WHERE STCODE = ' + QuotedStr(AStatusCode);
Active := true;
cbStatusCodes.Text := FieldByName('STDESC').AsString;
end;
end;
except I can't figure out how to refer to this particular instance of the form! In the OnShow event I can use SELF and it works fine, but when I try to move this to it's own procedure (within the JurorInformation.pas) it doesn't work. I have tried putting the declaration in all kinds of places at the top (implementation, private, public) and always get a unsatisified forward or external declaration.
Anyone give me a clue on how I can implement this? There are a few other procedures that I would like to use, but I'm stuck!
Leslie