If User.group = "售piao员" Then
RibbonTabs("Table").Visible = False
RibbonTabs("Project").Groups("Project").Visible =False
RibbonTabs("Project").Groups("Design").Visible =False
RibbonTabs("Project").Groups("Timers").Visible =False
RibbonTabs("Project").Groups("Watcher").Visible =False
RibbonTabs("Project").Groups("Users").Items("Logon").Visible =True
RibbonTabs("Project").Groups("Users").Items("Users").Visible =False
RibbonTabs("Other").Visible = False
RibbonTabs("Print").Visible = False
Else
RibbonTabs("Table").Visible = True
RibbonTabs("Project").Groups("Project").Visible =True
RibbonTabs("Project").Groups("Design").Visible =True
RibbonTabs("Project").Groups("Timers").Visible =True
RibbonTabs("Project").Groups("Watcher").Visible =True
RibbonTabs("Project").Groups("Users").Items("Users").Visible =True
RibbonTabs("Other").Visible = True
RibbonTabs("Print").Visible = True
End If
Dim StartDate As New Date(Date.Today.Year, Date.Today.Month, 1)
Dim EndDate As New Date(Date.Today.Year, Date.Today.Month, Date.DaysInMonth(Date.Today.Year, Date.Today.Month))
If User.Group = "售piao员"
Dim fl As String = "售piao员 = '" & User.Name & "'"
DataTables("旅行社入园登记").LoadFilter = "[日期] >= #" & StartDate & "# And [日期] <= #" & EndDate & "#" & " And " & fl
Else
DataTables("旅行社入园登记").LoadFilter = "[日期] >= #" & StartDate & "# And [日期] <= #" & EndDate & "#"
End If
DataTables("旅行社入园登记").Load()
If CurrentTable.Name = "旅行社入园登记" Then
If User.Group = "班长" Then
DataTables("旅行社入园登记").AllowEdit = False
ElseIf User.Group = "科室" Then
DataTables("旅行社入园登记").AllowEdit = False
Else
DataTables("旅行社入园登记").AllowEdit = True
End If
Else
If User.Group = "售piao员" Then
CurrentTable.AllowEdit = False
Else
CurrentTable.AllowEdit = True
End If
End If
If CurrentTable.Name = "旅行社入园登记" Then
If User.Group = "售piao员" Then
Forms("按钮").Controls("刷新").Visible = False
Forms("按钮").Controls("导入").Visible = False
Forms("按钮").Controls("旅行社汇总").Visible = False
Forms("按钮").Controls("客源地汇总").Visible = False
Forms("按钮").Controls("新增一行").Visible = True
Forms("按钮").Controls("新增多行").Visible = True
Forms("按钮").Controls("复制行").Visible = True
Forms("按钮").Controls("删除行").Visible = True
ElseIf User.Group = "班长" Then
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = True
Forms("按钮").Controls("旅行社汇总").Visible = True
Forms("按钮").Controls("客源地汇总").Visible = True
Forms("按钮").Controls("新增一行").Visible = False
Forms("按钮").Controls("新增多行").Visible = False
Forms("按钮").Controls("复制行").Visible = False
Forms("按钮").Controls("删除行").Visible = False
ElseIf User.Group = "科室" Then
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = False
Forms("按钮").Controls("旅行社汇总").Visible = True
Forms("按钮").Controls("客源地汇总").Visible = True
Forms("按钮").Controls("新增一行").Visible = False
Forms("按钮").Controls("新增多行").Visible = False
Forms("按钮").Controls("复制行").Visible = False
Forms("按钮").Controls("删除行").Visible = False
Else
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = True
Forms("按钮").Controls("旅行社汇总").Visible = True
Forms("按钮").Controls("客源地汇总").Visible = True
Forms("按钮").Controls("新增一行").Visible = True
Forms("按钮").Controls("新增多行").Visible = True
Forms("按钮").Controls("复制行").Visible = True
Forms("按钮").Controls("删除行").Visible = True
End If
Else
If User.Group = "售piao员" Then
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = False
Forms("按钮").Controls("旅行社汇总").Visible = False
Forms("按钮").Controls("客源地汇总").Visible = False
Forms("按钮").Controls("新增一行").Visible = False
Forms("按钮").Controls("新增多行").Visible = False
Forms("按钮").Controls("复制行").Visible = False
Forms("按钮").Controls("删除行").Visible = False
ElseIf User.Group = "班长" Then
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = False
Forms("按钮").Controls("旅行社汇总").Visible = False
Forms("按钮").Controls("客源地汇总").Visible = False
Forms("按钮").Controls("新增一行").Visible = True
Forms("按钮").Controls("新增多行").Visible = True
Forms("按钮").Controls("复制行").Visible = True
Forms("按钮").Controls("删除行").Visible = True
ElseIf User.Group = "科室" Then
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = False
Forms("按钮").Controls("旅行社汇总").Visible = False
Forms("按钮").Controls("客源地汇总").Visible = False
Forms("按钮").Controls("新增一行").Visible = True
Forms("按钮").Controls("新增多行").Visible = True
Forms("按钮").Controls("复制行").Visible = True
Forms("按钮").Controls("删除行").Visible = True
Else
Forms("按钮").Controls("刷新").Visible = True
Forms("按钮").Controls("导入").Visible = True
Forms("按钮").Controls("旅行社汇总").Visible = True
Forms("按钮").Controls("客源地汇总").Visible = True
Forms("按钮").Controls("新增一行").Visible = True
Forms("按钮").Controls("新增多行").Visible = True
Forms("按钮").Controls("复制行").Visible = True
Forms("按钮").Controls("删除行").Visible = True
End If