title: How to get data to a combo box in foxpro
body: <p>I have a combo box and, I need to insert data ranges and select a field to filter data from sql server to get data to the combo box. For that I used this code but the data are not display in the combo box. How can I do this in a correct way?</p>
  <pre><code>stra=&quot;select cAcctNumber from MAS.dbo.vACP_Payments where cFtyCD=?thisform.cboFactory.value and dPaymentDate&gt;= ?thisform.txtFromDate.Value &quot;
  stra=stra+&quot; AND dPaymentDate&lt;= ?thisform.txtToDate.Value and cPaymentTypeDesc='CHEQUE' group by cAcctNumber &quot;
  SQLExec(hndOps,stra,'AccNos')
  
  
  thisform.cboAccNo.Value=AccNos.cAcctNumber 
  </code></pre>