|
4#
楼主 |
发表于 2002-3-27 17:47:00
|
只看该作者
这时源代码运行不能正确运行,见附件)
Private Sub 文本1_Change()
Dim db As Database
Dim qdf As QueryDef
Dim strsql As String
On Error Resume Next
Set db = CurrentDb
DoCmd.DeleteObject acQuery, "查询1"
Set qdf = db.CreateQueryDef("查询1")
strsql = "SELECT 表2.姓名, 表2.职业 " _
& "FROM 表2 " _
& "WHERE (((表2.姓名) Like '" & Me.文本1 & "*')) " _
& "ORDER BY 表2.姓名;"
qdf.SQL = strsql
DoCmd.Requery "列表5"
Set qdf = Nothing
Set db = Nothing
End Sub
|
|