The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
|
|
populate combo box
Posted: 25 Jul 06 7:49 AM
|
fiogf49gjkf0d Is it possible to populate a combo box at the time of clicking on the CB control. For example, have a table that contains sales codes that are tied back to the userid field in userinfo. When you click on the CB, we want to look at the lueacctmgr.lookupid on the account detail screen and pull back those values that match that user id.
Thanks, David Ogles |
|
|
|
Re: populate combo box
Posted: 25 Jul 06 8:09 AM
|
fiogf49gjkf0d You should be able to do what you want by attaching a script to the WhenChange of WhenClick event of the CB control. |
|
|
|
Re: populate combo box
Posted: 25 Jul 06 8:43 AM
|
fiogf49gjkf0d But how would you do that? I'm a little "green" when it comes to that level of VB.
Thanks |
|
|
|
Re: populate combo box
Posted: 25 Jul 06 9:11 AM
|
fiogf49gjkf0d You will need to use the SalesLogix Architect to modify the form that contains the CB that you are intereset in. It is hard to be more specific without knowing even what screen you are trying to modify.
Have you had any training in SalesLogix development or read any of the documentation? |
|
|
|
Re: populate combo box
Posted: 25 Jul 06 9:28 AM
|
fiogf49gjkf0d Sure have but really rusty. Anyways, figured it out. Here is the code:
dim strsql, objSC, objSLXDB Set objSLXDB = New SLX_DB Set objSC = objSLXDB.GetNewRecordSet strsql = "Select Salescode from Salespeople where userid = '" & lueacctmgr.text & "'" objSC.open strSQL, objSLXdb.connection combobox1.Items.clear
With objSC If Not (.BOF And .EOF) Then .MoveFirst For I = 0 To .RecordCount - 1 combobox1.Items.add(objSC.Fields("Salescode").Value) .MoveNext Next End If End With
objSC.Close Set objSC = Nothing |
|
|
|