音乐无戒

无戒非无戒律。“无“便是“有“,“有”便是“无”。有有则“无”,无无则“有“。实乃敬仰持戒之慎独,严于律己者而自醒也。
个人资料
  • 博客访问:
正文

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)
评论
目前还没有任何评论
登录后才可评论.