| 
 以下是引用片段: 
实现功能的关键代码为: Private Sub Form_Load() Call UpdateList(" ") 
'获得相关报表模板 Me.Combobbmb.AddItem ("全部显示列") Dim tmprs As New ADODB.Recordset Dim i As Integer 
Set tmprs = ExecSql("select * from bbmb where bbmc='" & "住房信息查询" & "'") With tmprs     If .RecordCount > 0 Then        For i = 1 To .RecordCount           Me.Combobbmb.AddItem (.Fields("bbmbmc").Value)           .MoveNext        Next     End If End With 
Me.Combobbmb.ListIndex = 0 
End Sub 
Private Sub MMButton_XPBE2_Click() '组合查询条件,查询符合条件的住房 Dim strwhere As String 
If Trim(Me.txtsssq.Text) <> "" Then   strwhere = strwhere + " and sqmc like '%" + Trim(Me.txtsssq.Text) + "%' " End If 
If Trim(Me.txtssjmq.Text) <> "" Then   strwhere = strwhere + " and jmqmc like '%" + Trim(Me.txtssjmq.Text) + "%' " End If 
If Trim(Me.txtsshz.Text) <> "" Then   strwhere = strwhere + " and hzxm like '%" + Trim(Me.txtsshz.Text) + "%' " End If 
If Trim(Me.txtzfdm.Text) <> "" Then   strwhere = strwhere + " and zfdm ='" + Trim(Me.txtzfdm.Text) + "' " End If 
Call UpdateList(strwhere) End Sub 
Private Sub MMButton_XPBE3_Click() '导出报表 Call OutExcel(ddd, "住房信息列表") End Sub
  
  
  |