Fill listbox from query??

I have two forms in FR, one with a listbox and a TQuery, the other is the report. How do I fill the listbox from the query?? I want the user to select an option from the listbox that I will use in the report.

I tried this code in the page1 OnActivate :

begin
tblPrograms.Open;
while not tblPrograms.eof do begin
lbPrograms.Add(tblPrograms);
tblPrograms.next;
end;
end

The list shows up emtpy.

- Gary

Comments

  • edited 5:50PM
    Should be

    lbPrograms.Add([DialogForm.tblPrograms."name"]);
  • edited 5:50PM
    still not working. hmm. any examples of this type of report? I'd like to fill the listbox from a table, then using the id of the record as a parameter to the main query for the report. Anyone done this before?

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.