音樂無戒

無戒非無戒律。“無“便是“有“,“有”便是“無”。有有則“無”,無無則“有“。實乃敬仰持戒之慎獨,嚴於律己者而自醒也。
個人資料
  • 博客訪問:
正文

Some of the code may help - access

(2011-10-22 21:21:51) 下一個
If you have a form Name "invAHLList". Click a "InvoiceIDList" on the form, you can update the value of a field in the table "invHead" and using where to sort a record line has the same invoiceID with the one you select in the "invoiceIDList".Here is the code:

CurrentDb.Execute "Update invHead SET InvAcctRcvbCheck = -1" _& " WHERE [invoiceID] =" & Forms![invAHTList]![invoiceIDList]

NZ(Expression, valueWhenIs Null) is very useful. The following code returns the value and 'Null" when it is null:

Dim rate As String
rate = Nz(DLookup("invExRate", "invAHTqry", "[invoiceID]=" & Me.invoiceIDList), "Null")
MsgBox ("rate=     " & rate)
[ 打印 ]
閱讀 ()評論 (0)
評論
目前還沒有任何評論
登錄後才可評論.