Adding a parameter when populating combo box from BO


Author
Message
Jason Seidell
Jason Seidell
StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)
Group: Forum Members
Posts: 59, Visits: 180
I tried to search, and I couldn't find an answer to this question.

I have a table with various codesets that I want to use for populating combo boxes and also display in various reports

ie.  Table - codesets

Codeset    Value     Description

Version      1234      Basic File version

Version      2345      Extended File version

DataType    N         Numeric

DataType    S          String

DataType    T          Time

I have created the CodeSetBO and created a FillCodeSet(CodeSet) on the BO like the following

Public Sub FillCodeSet(ByVal CodeSet As String)

Me.FillDataTable("SELECT * FROM CodeSets WHERE CodeSet = " & CodeSet & " ORDER BY Value")

End Sub

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.

Here is the populating code from the form.designer.vb code

ListPopulationSettings1.MethodToExecute = "FillCodeSet;System.String"

As long as I leave the System.String it successfully calls FillCodeSet but the string is NOTHING.  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.

Any ideas??

Thanks,

Jason



Jason Seidell

Programmer/Analyst

Infinedi

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
You can either pass it over and manually call the Requery method...or better yet, handle the ListPopulating event of the combo box.  That is the purpose of this event, it allows you to specify parms to a method that is being executed.  You can refer to the docs for more detail.  There is a nice step-by-step article showing you exactly how to do this:

Application Framework -> UI Layer -> Controls -> List Population

Jason Seidell
Jason Seidell
StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)StrataFrame Novice (103 reputation)
Group: Forum Members
Posts: 59, Visits: 180
Ok, thanks for pointing out the listPopulating event that worked, thanks!!!

Jason Seidell

Programmer/Analyst

Infinedi

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search