Login / Register  search  syndication  about

          SalesLogix Questions & Answers

Your place to get answers to your SalesLogix related questions.

 Home  |   Subscribe via RSS  |   Subscribe via E-mail  |   

Running Query SalesLogix and Displaying Results in the cboProductType

Question: In SalesLogix I am trying to run a query, and after the query is executed I would like the results to be displayed in the field cboProductType.  I applied the following code to my form but it's not working:

Sub cboProductTypeChange(Sender)

dim oCon
dim oRS
dim strSQL
Set oCon = Application.GetNewConnection
strSQL = "SELECT DISTINCT(ORDER_FAMILY) FROM BIP_ORDER_HEADERS WHERE ORDER_FAMILY IS NOT NULL"

While Not oRS.EOF
cboProductType.Items.Add(oRs.Fields("ORDER_FAMILY").Value)
oRS.MoveNext
WEnd
End Sub
 
What am I missing?
 
Answer: After you set strSQL you need to populate your result set:
 
Set oRS = oCon.Execute(strSQL)

When you are finished with your objects be sure to close and dispose of them.  If a sub is repeatedly called the cbo items append over and over, so consider adding this as well: cboProductType.Items.Clear
What's This?
  
Bookmark and Share

About SalesLogix Support

   Your SalesLogix Business Partner for SalesLogix Support.


Related Content
   Can the SalesLogix Application architect's build process be automated?
Can the SalesLogix Application architect's build process be automated, or called from a batch file? W
Posted on May 16, 2013 by SalesLogix Support to SalesLogix Questions & Answers
 
   Is it possible to Sync SalesLogix Attachments based on Account Manager?
Is it possible to only sync SalesLogix Attachments from the accounts where the user is the account manag
Posted on May 15, 2013 by SalesLogix Support to SalesLogix Questions & Answers
 
   SalesLogix Remote Library Management
Is it possible to log into a SalesLogix Remote Database as Admin and Manage the Library Files?
Posted on May 14, 2013 by SalesLogix Support to SalesLogix Questions & Answers
 
   Demystifying SalesLogix Web: Dashboards and Analytics Tools
Join us for a free webinar, Wednesday, May 15th at 2pm CDT. The SalesLogix Web dashboards and analytics
Posted on May 08, 2013 by Brianna Tinjum to The Inbox
 
   What is the Difference Between Left Joins and Inner Joins in SalesLogix?
Question: What is the difference between Left joins and Inner joins in SalesLogix?
Posted on May 07, 2013 by SalesLogix Support to SalesLogix Questions & Answers
 
Comments

No Comments
All contents Copyright © 2013 Customer FX Corporation
Customer FX Corporation
2324 University Avenue West, Suite 115
Saint Paul, Minnesota 55114
Tel: 800.728.5783

  Follow @CustomerFX on twitter
Follow the best news, tips, and articles
  Subscribe to Customer FX on youtube
Watch SalesLogix tutorial videos from Customer FX
Login / Register