回複:問一個MS Access prohject問題

來源: tryyyyyy 2006-05-05 12:16:19 [] [舊帖] [給我悄悄話] 本文已被閱讀: 次 (992 bytes)
在UPDATE QUERY的DESIGN VIEW中的UPDATE TO欄中,輸入:
DMax("Order_ID","Order_detail")+1
在CRITERIA中,輸入:0

In Access, the DMax function returns the maximum value in a specified set of records (or domain).

The syntax for the DMax function is:

DMax ( expression, domain, [criteria] )

expression is the field that you wish to find the maximum value for.

domain is the set of records. This can be a table or a query name.

criteria is optional. It is the WHERE clause to apply to the domain.



For example:

Let's take a look at a simple example:

DMax("UnitPrice", "Order Details", "OrderID = 10248")

In this example, you would return the maximum UnitPrice from the Order Details table where the OrderID is 10248. This is the same as the following SQL statement:

SELECT Max([Order Details].UnitPrice) AS MaxOfUnitPrice
FROM [Order Details]
WHERE ((([Order Details].OrderID)=10248));


請您先登陸,再發跟帖!

發現Adblock插件

如要繼續瀏覽
請支持本站 請務必在本站關閉/移除任何Adblock

關閉Adblock後 請點擊

請參考如何關閉Adblock/Adblock plus

安裝Adblock plus用戶請點擊瀏覽器圖標
選擇“Disable on www.wenxuecity.com”

安裝Adblock用戶請點擊圖標
選擇“don't run on pages on this domain”