5 个解决方案
#1
!=, <, >, <=, >=
#2
<>
#3
<>
#4
一个例子:
Dim dbs As Database, rst As Recordset
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Select records from the Employees table where the
' last name is King.
Set rst = dbs.OpenRecordset("SELECT LastName, " _
& "FirstName FROM Employees " _
& "WHERE LastName = 'King';")
' Populate the Recordset.
rst.MoveLast
' Call EnumFields to print the contents of the
' Recordset.
EnumFields rst, 12
dbs.Close
Dim dbs As Database, rst As Recordset
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Select records from the Employees table where the
' last name is King.
Set rst = dbs.OpenRecordset("SELECT LastName, " _
& "FirstName FROM Employees " _
& "WHERE LastName = 'King';")
' Populate the Recordset.
rst.MoveLast
' Call EnumFields to print the contents of the
' Recordset.
EnumFields rst, 12
dbs.Close
#5
或Set rst = dbs.OpenRecordset("SELECT LastName, " _
& "FirstName FROM Employees " _
& "WHERE LastName <> 'King';")
& "FirstName FROM Employees " _
& "WHERE LastName <> 'King';")
#1
!=, <, >, <=, >=
#2
<>
#3
<>
#4
一个例子:
Dim dbs As Database, rst As Recordset
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Select records from the Employees table where the
' last name is King.
Set rst = dbs.OpenRecordset("SELECT LastName, " _
& "FirstName FROM Employees " _
& "WHERE LastName = 'King';")
' Populate the Recordset.
rst.MoveLast
' Call EnumFields to print the contents of the
' Recordset.
EnumFields rst, 12
dbs.Close
Dim dbs As Database, rst As Recordset
' Modify this line to include the path to Northwind
' on your computer.
Set dbs = OpenDatabase("Northwind.mdb")
' Select records from the Employees table where the
' last name is King.
Set rst = dbs.OpenRecordset("SELECT LastName, " _
& "FirstName FROM Employees " _
& "WHERE LastName = 'King';")
' Populate the Recordset.
rst.MoveLast
' Call EnumFields to print the contents of the
' Recordset.
EnumFields rst, 12
dbs.Close
#5
或Set rst = dbs.OpenRecordset("SELECT LastName, " _
& "FirstName FROM Employees " _
& "WHERE LastName <> 'King';")
& "FirstName FROM Employees " _
& "WHERE LastName <> 'King';")