请教下面这段代码
monqu 2005-08-22 08:14:27 小弟半路被拖着维护LOTUS,无奈语法什么的都不懂,特请教以下这段代码
Sub Exiting(Source As Field)
Dim workspace As New notesuiworkspace
Dim doc As notesuidocument
Set doc =workspace.currentdocument
Dim note As notesdocument
Set note=doc.document
Dim keys As String
keys = note.bookname(0)//这句是什么意思,那个属性代表什么意思,我在哪里可以查到这个属性?
Dim s As New notesSession
Dim db As notesdatabase
Set db=s.currentdatabase
Dim view As notesview
Set view=db.getview("bybookno")
Set tmpnote = view.getdocumentbykey(keys,True) //这句是什么意思?
If Not(tmpnote Is Nothing) Then
note.bookno = tmpnote.bookno(0)
note.endnum = tmpnote.endnum(0)
m_end=doc.fieldgettext("endnum")
If m_end<=0 Then
Msgbox "此图书库存为0,不可外借"
Call doc.gotofield("bookname")
Exit Sub
End If
Else
Msgbox "提示:你必须选择待借图书名称!"
Call doc.GotoField("bookname")
Exit Sub
End If
End Sub
代码执行有错误.一离开就bookname这个域就显示你必须选择待借图书名称,也就是执行了else.请问为什么,我明明都有选择了书本.还有上面有两个标志疑问,也请帮忙回答一下,其他的大概都看的懂,谢谢!