﻿<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>StrataFrame Forum » StrataFrame Application Framework - V1 » WinForms (How do I?)  » Adding a parameter when populating combo box from BO</title><generator>InstantForum 2017-1 Final</generator><description>StrataFrame Forum</description><link>http://forum.strataframe.net/</link><webMaster>StrataFrame Forum</webMaster><lastBuildDate>Tue, 09 Jun 2026 19:20:20 GMT</lastBuildDate><ttl>20</ttl><item><title>Adding a parameter when populating combo box from BO</title><link>http://forum.strataframe.net/FindPost12208.aspx</link><description>I tried to search, and I couldn't find an answer to this question.&lt;/P&gt;&lt;P&gt;I have a table with various codesets that I want to use for populating combo boxes and also display in various reports&lt;/P&gt;&lt;P&gt;ie.&amp;nbsp; Table - codesets&lt;/P&gt;&lt;P&gt;Codeset&amp;nbsp;&amp;nbsp;&amp;nbsp; Value&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Description&lt;/P&gt;&lt;P&gt;Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1234&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Basic File version&lt;/P&gt;&lt;P&gt;Version&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;2345&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Extended File version&lt;/P&gt;&lt;P&gt;DataType&amp;nbsp;&amp;nbsp;&amp;nbsp; N&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Numeric&lt;/P&gt;&lt;P&gt;DataType&amp;nbsp;&amp;nbsp;&amp;nbsp; S&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; String&lt;/P&gt;&lt;P&gt;DataType&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;T&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Time&lt;/P&gt;&lt;P&gt;I have created the CodeSetBO and&amp;nbsp;created a FillCodeSet(CodeSet) on the BO like the following&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Public&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/FONT&gt;&lt;FONT size=2&gt; FillCodeSet(&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;ByVal&lt;/FONT&gt;&lt;FONT size=2&gt; CodeSet &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;As&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;String&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Me&lt;/FONT&gt;&lt;FONT size=2&gt;.FillDataTable(&lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"SELECT * FROM CodeSets WHERE CodeSet = "&lt;/FONT&gt;&lt;FONT size=2&gt; &amp;amp; CodeSet &amp;amp; &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;" ORDER BY Value"&lt;/FONT&gt;&lt;FONT size=2&gt;)&lt;/P&gt;&lt;P&gt;&lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;End&lt;/FONT&gt;&lt;FONT size=2&gt; &lt;/FONT&gt;&lt;FONT color=#0000ff size=2&gt;Sub&lt;/P&gt;&lt;/FONT&gt;&lt;P&gt;And then when I set the PopulationDataSourceSettings to call FillCodeSet and then pass the parameter (ie. Version or DataType) to load the combo box, but I cannot figure out how to allow the parameter through.&lt;/P&gt;&lt;P&gt;Here is the populating code from the form.designer.vb code&lt;/P&gt;&lt;FONT size=2&gt;&lt;P&gt;ListPopulationSettings1.MethodToExecute = &lt;/FONT&gt;&lt;FONT color=#800000 size=2&gt;"FillCodeSet;System.String"&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#800000 size=2&gt;As long as I leave the System.String it successfully calls FillCodeSet but the string is NOTHING.&amp;nbsp; I have tried several variations of entering the parameter and it will fail before the sub is called with a value cannot be null error.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#800000 size=2&gt;Any ideas??&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#800000 size=2&gt;Thanks,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT color=#800000 size=2&gt;Jason&lt;/P&gt;&lt;/FONT&gt;</description><pubDate>Fri, 26 Oct 2007 10:22:18 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Adding a parameter when populating combo box from BO</title><link>http://forum.strataframe.net/FindPost12213.aspx</link><description>Ok, thanks for pointing out the listPopulating event that worked, thanks!!!</description><pubDate>Fri, 26 Oct 2007 10:22:18 GMT</pubDate><dc:creator>Jason Seidell</dc:creator></item><item><title>RE: Adding a parameter when populating combo box from BO</title><link>http://forum.strataframe.net/FindPost12211.aspx</link><description>You can either pass it over and manually call the Requery method...or better yet, handle the ListPopulating event of the combo box.&amp;nbsp; That is the purpose of this event, it allows you to specify parms to a method that is being executed.&amp;nbsp; You can refer to the docs for more detail.&amp;nbsp; There is a nice step-by-step article showing you exactly how to do this:&lt;/P&gt;&lt;P&gt;Application Framework -&amp;gt; UI Layer -&amp;gt; Controls -&amp;gt; List Population</description><pubDate>Fri, 26 Oct 2007 10:08:45 GMT</pubDate><dc:creator>Trent L. Taylor</dc:creator></item></channel></rss>