Private Sub Command0_Click()
1.Dim db1 As Database
2.Dim rs1 As Recordset
3.Dim strSQL As String
4.Set db1 = CurrentDb
5.strSQL = "SELECT * FROM MaterialCategory"
6.Set rs1 = db1.OpenRecordset("SELECT * FROM MaterialCategory" | strSQL, dbOpenDynaset)
End Sub
|