我要失业了.
Private Sub Command1_Click()
Dim local_sql As String
Dim louhao As String
Dim danyuan As String
Dim fangjian As String
Dim conn As New ADODB.Connection, rs As New ADODB.Recordset
Dim rsContact As ADODB.Recordset
Dim sContactQuery As String
Dim zongji As Currency
Datagrid1.Visible = True
Picture2.Visible = False
Label6.Visible = True
louhao = DataCombo1.text
danyuan = DataCombo2.text
fangjian = DataCombo3.text
local_sql = "select 姓名 from dushuju where dushuju.楼号='" & louhao & "'" & _
" and dushuju.单元 ='" & danyuan & "'" & _
" and dushuju.房号 ='" & fangjian & "'"
Set conn = New ADODB.Connection
conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source =ihome.mdb;" & _
"Persist Security Info=False"
Set rs = New ADODB.Recordset
rs.Open local_sql, conn, 3, 3
Label6.Caption = ""
While Not rs.EOF
Label6.Caption = Label6.Caption & rs.Fields("姓名")
rs.MoveNext
Wend
sContactQuery = "SELECT * FROM dushuju WHERE 姓名='" & Label6.Caption & "'"
Set rsContact = New ADODB.Recordset
Set rsContact = conn.Execute(sContactQuery)
Set Datagrid1.DataSource = Nothing
Set Adodc2.Recordset = rsContact
Set Datagrid1.DataSource = rsContact'''''''''''''''''''
通过这段代码我要在datagrid1中显示出符合条件的所有记录,但是一运行,系统就提示:The rowset is not bookmarkable 错误出在'''''''''''处请帮忙看看究竟是什么原因,给出详细代码,谢谢