hi all,<br> i have recently just started learning Visual Basic 6 without any prior knowledge of basic.<br>my problem is this.. <br>1. i have combobox and had used it to list items from an unsorted foxpro database file or (using a field from (*.mdb), which ever you can help with) but now i would like to sort the list in the Dropdown combo boxalphabetically... is there any easy way of doing this or any way at all....please give me different methods if any.<br>and.<br>2.<br>when using a datareport form i cannot get the data to be refreshed without restarting the program.. i have tried the solutions given on this forum and the dont even work, in most cases it tell me that it does not even support this method. the idea is that the datareport gets it data from a command in the Dataenviroment that is linked to a MSAcess database, where i retrieve the recordset. during the run time i add - update then view the datareport with the new data -then i delete this data. the first time i run the query it works perfectly, however, any other time during the execution of the program it shows me the first data that i had requested as if getting it from a "cache" or something. after it deletes the records i close the program and view the table and as it should be the data is gone ,please can some one advice.here is an example of the codes used:<br>Private Sub Command1_Click()<br><br>Dim custName As String<br>Dim stuff1 As String <br>Dim stuff1x As String <br>'Variables used to print on report<br>Dim codes As String<br>'Initialize variables<br>cdes = " "<br><br>Dim try As Boolean<br>Dim try2 As Boolean<br><br>'Initialize local variables<br>stuff1 = "NULL"<br>try = True<br>try2 = False<br>'******************************<br>'On Error GoTo ErrorHandler 'Error Handling<br><br>custName = Format(DBCombo1.Text, ">" 'Gets the customer id or company name<br><br>transaction.Recordset.MoveFirst 'reset database to Begining of file<br><br>cusrep.Refresh<br><br>arcustd.Recordset.MoveFirst<br>Do Until arcustd.Recordset.EOF<br> If arcustd.Recordset![custno] = custName Then 'Works with Input from user<br> stuff1x = arcustd.Recordset![company]<br> ' MsgBox "ID# Given"<br> End If<br> If arcustd.Recordset![company] = custName Then 'Works with List<br> stuff1x = arcustd.Recordset![company]<br> custName = arcustd.Recordset![custno]<br> ' MsgBox "Company name Given"<br> End If<br> arcustd.Recordset.MoveNext<br>Loop<br><br>Do Until transaction.Recordset.EOF<br> If transaction.Recordset![cust_id] = custName Then<br> stuff1 = transaction.Recordset![cust_id]<br> cusrep.Recordset.AddNew<br> cusrep.Recordset![custName] = stuff1x<br> cusrep.Recordset![cust_id] = transaction.Recordset![cust_id]<br> cusrep.Recordset![points] = transaction.Recordset![points]<br> cusrep.Recordset![rdate] = transaction.Recordset![date_r]<br> try2 = True<br> If transaction.Recordset![redem_code] <> 0 Then ' MsgBox "Has redem code"<br> Do Until redeem.Recordset![redem_id] = transaction.Recordset![redem_code]<br> redeem.Recordset.MoveNext<br> Loop<br> cusrep.Recordset![Description] = redeem.Recordset![Description]<br> cusrep.Recordset.Update<br> Else<br> cusrep.Recordset![invno] = transaction.Recordset![invno]<br> cusrep.Recordset.Update<br> End If<br> End If<br> <br> redeem.Recordset.MoveFirst 'reset redeem tables<br> transaction.Recordset.MoveNext<br>Loop<br><br>If stuff1 = "NULL" Then<br> MsgBox ("Customer Record NOT Found"<br>Else<br>' DataReport2.Refresh<br> cusrep.Recordset.AbsolutePosition = 0<br> 'Load frmout<br> 'frmout.Show<br> 'cusrep.Recordset.MoveFirst<br> 'RAJ : *** cusrep.Recordset.Restartable<br> 'RAJ : *** data1.rscust_st.Requery<br> <br> 'RAJ: DataReport2.Refresh<br> 'data1.rscust_st.Requery<br> '&&** DataReport2.Show<br> Load frmout<br> frmout.Show<br> countp = 1<br> Do Until countp = 20<br> frmout.Print " "<br> countp = countp + 1<br> Loop<br> frmout.Print "Customer ID"; Space(10); "Company"; Space(30); "Points"; Space(10); "Date"; Space(15); "Description"<br> frmout.Print " "<br> frmout.Print " "<br> Do Until cusrep.Recordset.EOF<br> If cusrep.Recordset![Description] <> "Null" Then cdes = cusrep.Recordset![Description]<br> <br> frmout.Print cusrep.Recordset![cust_id]; Space(15); cusrep.Recordset![custName]; Space(15); cusrep.Recordset![points]; Space(10); cusrep.Recordset![rdate]; Space(10); cdes<br> cusrep.Recordset.MoveNext<br> cdes = " "<br> Loop<br> ' frmout.Print cusrep.Recordset![cust_id] '; Space(7); cusrep.Recordset![custName]<br> 'RAJ: Load csform<br> 'mshflexgrid1.Refresh<br> 'RAJ: csform.Show<br> 'MsgBox "Wait Look"<br> 'Load frmcusrep<br> 'frmcusrep.Show<br> 'csform.mshflexgrid1.Refresh<br> 'RAJ: DataReport2.DataMember = "select * from cusrep where cusrep.recordset![cust_id] = " & custName<br> 'DataReport2.DataSource = data1<br> 'RAJ: DataReport2.Show<br> 'Loading Printing option<br> 'Load printopt3<br> 'printopt3.Show<br> 'cusrep.Recordset.BOF<br> If try2 Then<br> cusrep.Recordset.MoveFirst<br> Do Until cusrep.Recordset.EOF<br> cusrep.Recordset.Delete<br> cusrep.Recordset.MoveNext<br> Loop<br> End If<br>End If<br><br>transaction.Recordset.MoveFirst<br>Exit Sub<br><br>ErrorHandler:<br> MsgBox "No Records Found", vbInformation, "Record Not Found"<br><br>End Sub<br>also the reason i use a Datareport is because it is the only form i know that can print multiple pages, please advice.<br>i'm sorry that this is SOOOO Longggg <br>