|
|

楼主 |
发表于 2003/5/21 13:42:54
|
显示全部楼层
'设定当前的工作空间
Dim workspace As New NotesUIWorkspace
Set uidoc = workspace.CurrentDocument
'取文档中的域值
'定义绘画
Dim session As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim doc As notesdocument
'设定绘画
Set db = session.currentdatabase
Set view = db.getview("set_doc")
Set doc = view.getfirstdocument
'取文档值
mid_list = doc.globals_list_number(0)
'判断文档中的值来确定显示的值
midnum = Val(mid_list)
If midnum < 10 Then
last_list = first_list + "000" + Right(mid_list,1)
Elseif midnum < 100 Then
last_list = first_list + "00" + Right(mid_list,2)
Elseif midnum < 1000 Then
last_list = first_list + "0" + Right(mid_list,3)
Else
last_list = first_list + Right(mid_list,4)
End If
'给出正确的维修单流水号值
Call uidoc.fieldsettext( "ser_list",last_list )
'修改配置表单
midstr = Cstr(midnum+1)
doc.globals_list_number = midstr
Call doc.save(True, True)
我的意思是通过公式来实现上面的内容!呵呵~~~~
|
|