我有一个查询,例如返回 5 行,我想在文本框中显示这些行(字段)。但它只显示了一条记录。我还将表单的默认视图属性设置为连续表单。她是我的代码:
Private Sub List2_DblClick(Cancel As Integer)
Dim rst As DAO.Recordset
Set rst = CurrentDb.OpenRecordset("SELECT XValue, YValue,Wert FROM tb_DCM_Daten WHERE (FzgID=" & Forms!frm_fahrzeug!ID & " AND [Name]='" & List2.Value & "')")
If rst.RecordCount <> 0 Then
Do While Not rst.EOF
Text8.SetFocus
Text8.Text = rst.Fields("XValue").Value
Text10.SetFocus
Text10.Text = rst.Fields("YValue").Value
Text11.SetFocus
Text11.Text = rst.Fields("Wert").Value
rst.MoveNext
Loop
End If
End Sub
我怎样才能做到这一点?