将您的子com1_Click替换为以下块。希望这可以帮助 。 。 。
Private Sub com1_Click()
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strNames As String
Dim strSQL As String
' Following line gets the query of the form
strSQL = Me.RecordSource
' Alternatively, you can replace this line with your own select query
' For eg.
' strSQL = "Select * from Table1 Where [_ID] In (1,2)"
Set db = CurrentDb
Set rs = db.OpenRecordset(strSQL)
strNames = ""
'Following loop is for going through all the records
While Not rs.EOF
'Following line is for collecting values of Name1 Field of your table
strNames = strNames & " " & rs("Name1")
rs.MoveNext
Wend
' Populating the textbox with values collected from your table
text3 = Trim(strNames)
' Final cleanup
rs.Close
Set rs = Nothing
Set db = Nothing
End Sub
请更改您的问题。这是不可能理解的。 – 2011-12-27 20:28:08