我是个新手!
感谢大家的帮助!
比如说我在帧结构的左侧帧内所插入的表单上设置了一个操作热点,希望通过点击热点改变右侧帧(main)内所显示的视图。并编写了如下的LotusScript:
Sub Click(Source As Button)
Dim session As New notessession
Dim db As notesdatabase
Dim view As notesview
Dim vUser As Variant
vUser=Evaluate("@Name([CN];@UserName)") '得到当前用户
Set db=session.currentdatabase
Dim workspace As New NotesUIWorkspace
Call workspace.SetTargetFrame("main")
Dim uidb As NotesUIDatabase
If vUser="admin" Then
Set view=db.getview("vwbyname_all")
Else
Set view=db.GetView("vwbyname")
End If
Set uidb = workspace.CurrentDatabase
Call uidb.OpenView(view)
End Sub
运行的时候弹出错误消息:“Type mismatch ”
帮助中的解释为:
One of the following conditions could have caused this error:
1。You attempted an operation on operands with conflicting data types.
2。You assigned a value to a variable that has a different data type, and LotusScript cannot convert it automatically.
3。You are passing a value as an argument that has a different declared data type, and LotusScript cannot convert it automatically.
4。You used a string as the initial value, or as the To or Step value, in a For statement.