我的数据库不会转换为97! [英] My Database won't convert to 97!

查看:83
本文介绍了我的数据库不会转换为97!的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好。


我有一个我在Access 2000中开发的数据库,它正在工作

很好。


问题是我的客户只有Access 97.我试图转换

数据库,但主菜单不起作用。


我有两个部分,一个主菜单和一个显示选项按钮的子菜单。


我相信我必须使用一些97不喜欢的代码,但我不知道

什么(它甚至不能在97开放以允许我进行错误检查)。


我已粘贴下面的代码,如果有人能看到任何明显的错误

请让我知道,我将非常感激。


提前致谢,


John

主菜单代码

----------------------------


选项比较数据库

Dim pboolCloseAccess As Boolean

Dim dbs As DAO.Database

Dim rst as DAO.Recordset

Dim strcomm字符串

Dim strNews字符串


私有子cmdCloseDB_Click()

RecordNavigation(1)

pboolCloseAccess = True

DoCmd.Close acForm,fmnuMenu

LogOnOff(0)

DoCmd.Quit

End Sub


Private Sub TempButton_Click()

如果pboolCloseAccess = True那么

pboolCloseAccess = False

Else

pboolCloseAccess = True

结束如果

结束子


私人子Form_Unload(取消为整数)

''如果不是pboolCloseAccess则取消=真

结束子


私有子Form_Load()

LogOnOff(-1)

如果GetUser()=" john.ortt"然后

Me.TempButton.Visible = True

pboolCloseAccess = True

Else

Me.TempButton.Visible =错误

pboolCloseAccess = False

结束如果

设置dbs = CurrentDb

设置rst = dbs.OpenRecordset(" ; tblPeople")

如果rst.RecordCount> 0然后

rst.MoveFirst

直到rst.EOF

如果rst![chrPLogOn] = GetUser()那么

如果rst![lngPAdmin] = 1那么

strNews ="访问级别:SYSTEM ADMINISTRATOR"

结束如果

结束If

rst.MoveNext

循环

结束如果

rst.Close

Set rst = Nothing

如果strNews =""然后strNews =访问级别:SYSTEM USER(限制访问)

Forms.fmnuMenu.lblUserPermission.Caption = strNews

strNews =""


strNews =" Hello" &安培; UCase(左(GetUser(),1))& Mid(GetUser(),2,InStr(2,

GetUser(),"。",vbTextCompare) - 2)& " ;.欢迎来到Samlesbury

BAE系统物流培训数据库。

Forms.fmnuMenu.lblWelcomeMessage.Caption = strNews

strNews ="


设置rst = dbs.OpenRecordset(" tblComments")

如果rst.RecordCount = 0那么

strNews =" No Comments"

Else

rst.MoveFirst

Do until rst.EOF

strcomment = rst ![dtmComDate]& vbNewLine& rst![chrComment]& vbNewLine

& vbNewLine

strNews = strcomment& strNews

rst.MoveNext

Loop

结束如果

rst.Close

Set rst = Nothing

Forms.fmnuMenu.lblNews.Caption = strNews

strNews =""


Set rst = dbs.OpenRecordset(" qryMyTraining")

如果rst.RecordCount = 0那么

strNews =" No Courses Planned"

Else < br $>
rst.MoveFirst

strNews =" COURSES PLANNED" &安培; vbNewLine& vbNewLine

直到rst.EOF

如果rst![chrPLogOn] = GetUser rst![lngStatus] = 1那么

strcomment = rst ![dtmStartDate]& vbNewLine& rst![chrTTitle]&

vbNewLine& vbNewLine

否则

strcomment =""

结束如果

strNews = strNews& strmement

rst.MoveNext

Loop

rst.MoveFirst

strNews = strNews& vbNewLine& vbNewLine& COURSES QUEUED &安培; vbNewLine&

vbNewLine

直到rst.EOF

如果rst![chrPLogOn] = GetUser和rst![lngStatus] = 2那么

strcomment = rst![dtmRequestDate]& vbNewLine& rst![chrTTitle]&

vbNewLine& vbNewLine

否则

strcomment =""

结束如果

strNews = strNews& strmement

rst.MoveNext

Loop

rst.MoveFirst

strNews = strNews& vbNewLine& vbNewLine& 课程已完成 &安培; vbNewLine

& vbNewLine

直到rst.EOF

如果rst![chrPLogOn] = GetUser rst![lngStatus] = 3那么

strcomment = rst ![dtmStartDate]& vbNewLine& rst![chrTTitle]&

vbNewLine& rst![chrStatus]& " " &安培; rst![chrGrade]& vbNewLine& vbNewLine

strcomment = StrConv(strcomment,vbProperCase)

否则

strcomment =""

结束If

strNews = strNews& strmement

rst.MoveNext

循环

结束如果

rst.Close

设置rst = Nothing

dbs.Close

设置dbs = Nothing

Forms.fmnuMenu.lblTraining.Caption = strNews

ColourCells

End Sub


Private Sub Form_Timer()

Dim dbs作为DAO.Database

Dim rst作为DAO.Recordset

Dim strcomment As String,dtLastUsed As Date,LogOffNow As Boolean


设置dbs = CurrentDb

Set rst = dbs.OpenRecordset(" tblLastUsed",dbOpenSnapshot)

dtLastUsed = rst![dtmLastUsed]

LogOffNow = rst![blnLogOffNow]

rst。关闭


''将下一行的值更改为您要测试的分钟数

''。 1000等于一秒。

如果DateDiff(n,dtLastUsed,Now)> 5或LogOffNow = True然后

如果Me.Tag =" MsgSent"然后

pboolCloseAccess = True

DoCmd.Close acForm,fmnuMenu

Application.Quit(acQuitSaveNone)

Else

Me.Tag =" MsgSent"

DoCmd.OpenForm" frmExitNow"

结束如果

Else

Me.Tag =""

结束如果

结束子


Private Sub ColourCells()


静态ColArray(1到11,1到3)


ColArray(1,1)= 3932384''公司红色

ColArray(2,1)= 2098696''公司蓝色

ColArray(3,1)= 12105136''公司灰色

ColArray(4,1)= 10379776''REGATTA BLUE

ColArray(5,1)= 7624230''灰蓝色

ColArray(6,1)= 7301989'' DARK GRAY

ColArray(7,1)= 7105877''铁绿色

ColArray(8,1)= 8694703''橄榄

ColArray (9,1)= 37332''PUMPKIN

ColArray(10,1)= 8422400''AQUA MARINE

ColArr ay(11,1)= 13730304''SAPPHIRE BLUE


ColArray(1,2)= 12105136''CORPORATE RED

ColArray(2,2) ='16777215''公司蓝色

ColArray(3,2)= 3932384''公司灰色

ColArray(4,2)= 2098696''REGATTA BLUE

ColArray(5,2)= 12105136''灰色蓝色

ColArray(6,2)= 16777215''深灰色

ColArray(7,2) = 12105136''铁绿色

ColArray(8,2)= 3932384''橄榄

ColArray(9,2)= 7624230''PUMPKIN

ColArray(10,2)= 2098696''AQUA MARINE

ColArray(11,2)= 16777215''SAPPHIRE BLUE


ColArray(1, 3)= 16777215''公司红色

ColArray(2,3)= 12105136''公司蓝色

ColArray(3,3)= 2098696''公司灰色

ColArray(4,3)= 16777215''REGATTA BLUE

ColArray(5,3)= 16777215''灰色蓝色

ColArray(6, 3)= 12105136''深灰色

Co lArray(7,3)= 16777215''铁绿

ColArray(8,3)= 2098696''OLIVE

ColArray(9,3)= 2098696''南瓜

ColArray(10,3)= 16777215''AQUA MARINE

ColArray(11,3)= 0''SAPPHIRE BLUE


randomise = Int(11 * Rnd)+ 1

''基于:Int((HighestValue - LowestValue + 1)* Rnd)+ LowestValue


Me.lblTrainingBox.BackColor = ColArray(随机,1)

Me.lblTrainingTitle.ForeColor = ColArray(随机,2)

Me.linTraining.BorderColor = ColArray(随机,2)

Me.lblTraining.ForeColor = ColArray(随机,3)

randomise = Int(11 * Rnd)+ 1


Me.lblNewsBox.BackColor = ColArray(随机,1)

Me.lblNewsTitle.ForeColor = ColArray(随机,2)

Me.linNews .BorderColor = ColArray(随机,2)

Me.lblNews.ForeColor = ColArray(随机,3)


结束子

子菜单代码

-------------------------


选项比较数据库

昏暗MenuLevel As Integer

Dim AdminStat As Boolean

Dim dbs作为DAO.Database

Dim rst作为DAO.Recordset

私有子Form_Open(取消为整数)

设置dbs = CurrentDb

设置rst = dbs.OpenRecordset(" tblPeople")

如果rst.RecordCount> 0然后

rst.MoveFirst

直到rst.EOF

如果rst![chrPLogOn] = GetUser()那么

如果rst![lngPAdmin] = 1则

AdminStat = True

结束如果

结束如果

rst.MoveNext

循环

结束如果

rst.Close

Set rst = Nothing

菜单(0)

结束子

私人子ReduceSpace()

调用UpdateActivity

结束Sub $ / $
Private Sub Blink()

Me.cmdInvisible.SetFocus

Me.lblButton1.Visible = False:Me.cmdButton1.Enabled = False :

Me.cmdButton1.Visible = False

Me.lblButton2.Visible = False:Me.cmdButton2.Enabled = False:

Me。 cmdButton2.Visible = False

Me.lblButton3.Visible = False:Me.cmdButton3.Enabled = False:

Me.cmdButton3.Visible = False

Me.lblButton4.Visible = False:Me.cmdButton4.Enabled = False:

Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me.cmdButton5.Enabled = False:

Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Enabled = False:

Me.cmdButton6.Visible = False

End Sub


Private Sub cmdButton1_Click()

Blink

如果MenuLevel = 0那么

RecordNavigation(1):菜单(1):ReduceSpace''用户报告

ElseIf MenuLevel = 1 Then

RecordNavigation(11):菜单(0):ReduceSpace''返回主菜单

ElseIf MenuLevel = 2然后

RecordNavigation(12) :菜单(0):ReduceSpace''返回主菜单

ElseIf MenuLevel = 21然后

RecordNavigation(121):菜单(2):ReduceSpace''管理员报告

ElseIf MenuLevel = 3然后

RecordNavigation(13):菜单(0):ReduceSpace''返回主菜单

ElseIf MenuLevel = 4 Then

RecordNavigation(14):菜单(0):ReduceSpace''返回主菜单

Els如果MenuLevel = 41那么

RecordNavigation(141):菜单(4):ReduceSpace''课程菜单

ElseIf MenuLevel = 42然后

RecordNavigation (142):菜单(4):ReduceSpace''课程菜单

ElseIf MenuLevel = 43然后

RecordNavigation(143):菜单(4):ReduceSpace''课程菜单

ElseIf MenuLevel = 431然后

RecordNavigation(1431):菜单(43):ReduceSpace''课程作业

ElseIf MenuLevel = 5然后

RecordNavigation(15):菜单(0):ReduceSpace''返回主菜单

ElseIf MenuLevel = 6然后

RecordNavigation(16):菜单(0):ReduceSpace''返回主菜单

结束如果

结束子

私人子cmdButton2_Click()

Blink

如果MenuLevel = 0那么

RecordNavigation(2):菜单(2):ReduceSpace''管理员报告

ElseIf MenuLevel = 1然后

RecordNavigation(21):菜单(1):DoCmd.OpenForm&q uot; frmMyTraining",acNormal,

,stLinkCriteria

ElseIf MenuLevel = 2然后

RecordNavigation(22):菜单(2):DoCmd。 OpenForm" frmMyTraining",acNormal,

,stLinkCriteria

ElseIf MenuLevel = 21然后

RecordNavigation(221):菜单(21):MsgBox (按课程查看成绩)

ElseIf MenuLevel = 3然后

RecordNavigation(23):Menu(3):DoCmd.OpenForm" frmPeople" ,,,

stLinkCriteria,acFormAdd

ElseIf MenuLevel = 4然后

RecordNavigation(24):菜单(41):ReduceSpace''添加/修改课程详细信息

ElseIf MenuLevel = 41然后

RecordNavigation(241):菜单(41):DoCmd.OpenForm" frmTraining",,,

stLinkCriteria ,acFormAdd

ElseIf MenuLevel = 42然后

RecordNavigation(242):菜单(42):DoCmd.OpenForm" frmSchedule",,,

stLinkCriteria,acFormAdd

ElseIf MenuLevel = 43然后

RecordNavigation(243):菜单(43):DoCmd.OpenForm" frmAllocationMenu",,,

stLinkCriteria,acFormAdd

ElseI MenuLevel = 431然后

RecordNavigation(2431):菜单(431):MsgBox(按员工导航)

ElseIf MenuLevel = 5然后

RecordNavigation(25):菜单(5):MsgBox(添加/修改公司)

ElseIf MenuLevel = 6然后

RecordNavigation(26):菜单(6):MsgBox(分配权限)

结束如果

结束子

私有子cmdButton3_Click()

Blink

如果MenuLevel = 0则

RecordNavigation(3):菜单(3):ReduceSpace''管理员工详细信息

ElseIf MenuLevel = 1然后

RecordNavigation(31):菜单(1):DoCmd.OpenForm" frmCourseSched",acNormal,

,stLinkCriteria

ElseIf MenuLevel = 2然后

RecordNavigation(32):菜单(2):DoCmd.OpenForm&quo t; frmCourseSched",acNormal,

,stLinkCriteria''使用直到生成组计划表格。

ElseIf MenuLevel = 21然后

RecordNavigation (321):菜单(21):MsgBox(按候选人查看等级)

ElseIf MenuLevel = 3然后

RecordNavigation(33):菜单(3): DoCmd.OpenFormfrmPeople,acNormal ,,

stLinkCriteria

ElseIf MenuLevel = 4然后

RecordNavigation(34):菜单(4) :菜单(42):ReduceSpace''添加/修改课程

时间表

ElseIf MenuLevel = 41然后

RecordNavigation(341):菜单( 41):DoCmd.OpenFormfrmTraining,acNormal,

,stLinkCriteria

ElseIf MenuLevel = 42然后

RecordNavigation(342):菜单(42):DoCmd.OpenForm" frmSchedule",acNormal,

,stLinkCriteria

ElseIf MenuLevel = 43然后

RecordNavigation(343):菜单(431):ReduceSpace

ElseIf MenuL evel = 431然后

RecordNavigation(3431):菜单(431):MsgBox(按课程导航)

ElseIf MenuLevel = 5然后

RecordNavigation(35):菜单(5):MsgBox(添加/修改分组)

ElseIf MenuLevel = 6然后

RecordNavigation(36):菜单( 6):MsgBox(注销所有用户)

结束如果

结束子

私人子cmdButton4_Click()

Blink

如果MenuLevel = 0那么

RecordNavigation(4):菜单(4):ReduceSpace''管理课程详情

ElseI MenuLevel = 1然后

RecordNavigation(31):菜单(1):DoCmd.OpenForm" frmCourseSched",acNormal,

,stLinkCriteria''使用直到个人成绩表单生成。

ElseIf MenuLevel = 2然后

RecordNavigation(32):菜单(2):DoCmd.OpenFormfrmCourseSched,acNormal,

,stLinkCriteria''使用直到生成组Grades表格。

ElseIf MenuLevel = 21然后

RecordNavigation(321):菜单(21):MsgBox(未使用)

ElseIf MenuLevel = 3然后

RecordNavigation(33):菜单(3):MsgBox(未使用)

ElseIf MenuLevel = 4然后

RecordNavigation(34) :菜单(43):ReduceSpace''添加/修改课程分层

ElseIf MenuLevel = 41然后

RecordNavigation(341):菜单(41):MsgBox(¬)使用")

ElseIf MenuLevel = 42然后

RecordNavigation(342):菜单(42):MsgBox(未使用)

ElseI MenuLevel = 43然后

RecordNavigation(343):菜单(43):MsgBox(未使用)

ElseIf MenuLevel = 431然后

RecordNavigation(3431):菜单(431):MsgBox(未使用)

ElseIf MenuLevel = 5然后

RecordNavigation(35):菜单(5) :MsgBox(添加/修改状态')

ElseIf MenuLevel = 6然后

RecordNavi gation(36):菜单(6):MsgBox(用法统计)

结束如果

End Sub

Private Sub cmdButton5_Click( )

Blink

如果MenuLevel = 0那么

RecordNavigation(5):菜单(5):ReduceSpace''管理Miscelaneous

ElseIf MenuLevel = 1然后

RecordNavigation(31):菜单(1):DoCmd.OpenForm" frmCourseQueuesMenu",

acNormal ,, stLinkCriteria

ElseIf MenuLevel = 2然后

RecordNavigation(32):菜单(2):DoCmd.OpenForm" frmCourseQueuesMenu",

acNormal ,, stLinkCriteria

ElseIf MenuLevel = 21然后

RecordNavigation(321):菜单(21):MsgBox(未使用)

ElseIf MenuLevel = 3 Then

RecordNavigation(33):菜单(3):MsgBox(未使用)

ElseIf MenuLevel = 4然后

RecordNavigation(34) ):菜单(4):MsgBox(未使用)

ElseIf MenuLevel = 41然后

记录导航(341):菜单(41):MsgBox(未使用)

ElseIf MenuLevel = 42然后

RecordNavigation(342):菜单(42):MsgBox (未使用)

ElseIf MenuLevel = 43然后

RecordNavigation(343):菜单(43):MsgBox(未使用)

ElseIf MenuLevel = 431然后

RecordNavigation(3431):菜单(431):MsgBox(未使用)

ElseIf MenuLevel = 5然后

RecordNavigation(35):菜单(5):MsgBox(未使用)

ElseIf MenuLevel = 6然后

RecordNavigation(36):菜单(6):MsgBox(添加到评论)

结束如果

结束子

私人子cmdButton6_Click()

Blink

如果MenuLevel = 0那么

RecordNavigation(6):菜单(6):ReduceSpace''数据库管理

ElseI MenuLevel = 1然后

RecordNavigation(31):菜单(1):MsgBox(未使用)

ElseIf MenuLevel = 2 n $ / $
RecordNavigation(32):菜单(2):MsgBox(未使用)

ElseIf MenuLevel = 21然后

RecordNavigation( 321):菜单(21):MsgBox(未使用)

ElseIf MenuLevel = 3然后

RecordNavigation(33):菜单(3):MsgBox(" ;未使用")

ElseIf MenuLevel = 4然后

RecordNavigation(34):菜单(4):MsgBox(未使用)

ElseIf MenuLevel = 41然后

RecordNavigation(341):菜单(41):MsgBox(未使用)

ElseIf MenuLevel = 42然后

RecordNavigation(342):菜单(42):MsgBox(未使用)

ElseIf MenuLevel = 43然后

RecordNavigation(343):菜单( 43):MsgBox(未使用)

ElseIf MenuLevel = 431然后

RecordNavigation(3431):菜单(431):MsgBox(未使用)

ElseIf MenuLevel = 5然后

RecordNavigation(35):菜单(5):MsgBox(未使用)

ElseIf MenuLevel = 6然后

RecordNavigation(36):菜单(6):MsgBox(查看更改历史记录)

结束如果

结束子

子菜单(MenuVar)

MenuLevel = MenuVar

Me.lblButton1.Visible = True:Me.cmdButton1.Enabled = True :

Me.cmdButton1.Visible = True:Me.lblButton1.ForeColor = vbRed

Me.lblButton2.Visible = True:Me.cmdButton2.Enabled = True:

Me.cmdButton2.Visible = True

Me.lblButton3.Visible = True:Me.cmdButton3.Enabled = True:

Me.cmdButton3.Visible = True

Me.lblButton4.Visible = True:Me.cmdButton4.Enabled = True:

Me.cmdButton4.Visible = True

Me .lblButton5.Visible = True:Me.cmdButton5.Enabled = True:

Me.cmdButton5.Visible = True

Me.lblButton6.Visible = True:Me.cmdButton6。 Enabled = True:

Me.cmdButton6.Visible = True

如果MenuLevel = 0那么

如果AdminStat = False那么

Me.lblBut ton1.Visible = True:Me.cmdButton1.Visible = True

Me.lblButton2.Visible = False:Me.cmdButton2.Visible = False

Me.lblButton3.Visible =错误:Me.cmdButton3.Visible = False

Me.lblButton4.Visible = False:Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me。 cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

结束如果

Me.lblTitle。 Caption =" Main Menu"

Me.lblButton1.Caption =" User Reports" ;: Me.lblButton1.ForeColor =

vbBlack

Me.lblButton2.Caption =" Administrator Reports"

Me.lblButton3.Caption =" Manage Employee Details"

Me.lblButton4.Caption =" Manage Course Details" ;

Me.lblButton5.Caption =" Manage Miscelaneous"

Me.lblButton6.Caption ="数据库管理"

ElseIf MenuLevel = 1然后

Me.lblTitle.Capt ion ="我的报告"

Me.lblButton1.Caption ="返回主菜单>

Me.lblButton2.Caption ="我的培训详情"

Me.lblButton3.Caption =" Courses Scheduled"

Me.lblButton4.Caption =" My Grades"

Me.lblButton5.Caption = 查看课程队列

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 2然后

Me.lblTitle.Caption =" Administrator Reports"

Me.lblButton1.Caption ="返回主菜单

Me.lblButton2.Caption ="查看培训详情"

Me.lblButton3.Caption ="查看课程预定

Me.lblButton4.Caption ="查看成绩

Me.lblButton5.Caption ="查看课程队列

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 21然后

Me.lblTitle.C aption =" Administrator Reports - Grades"

Me.lblButton1.Caption ="返回管理员报告"

Me.lblButton2.Caption ="按课程查看成绩;

Me.lblButton3.Caption ="按候选人查看等级

Me.lblButton4.Visible = False:Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 3然后

Me.lblTitle.Caption ="员工详细信息菜单

Me.lblButton1.Caption ="返回主菜单

Me.lblButton2.Caption =" Add New Employee"

Me.lblButton3.Caption =" Edit Existing Employee"

Me.lblButton4.Visible = False :Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6 .Visible = False

ElseIf MenuLevel = 4然后

Me.lblTitle.Caption =" Courses Menu"

Me.lblButton1.Caption ="返回到主菜单

Me.lblButton2.Caption ="添加/修改课程详情"

Me.lblButton3.Caption =" Add / Amend Course Schedule"

Me.lblButton4.Caption =" Add / Amend Course Delegates"

Me.lblButton5.Visible = False:Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 41然后

Me.lblTitle.Caption ="课程详情"

Me.lblButton1.Caption ="返回课程详情"

Me.lblButton2.Caption ="创建新课程"

Me.lblButton3。 Caption =" Edit Existing Course"

Me.lblButton4.Visible = False:Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me.cmdButton5 .Visible = False

Me.lblButt on6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 42然后

Me.lblTitle.Caption ="课程可用性"

Me.lblButton1.Caption ="返回课程详细信息"

Me.lblButton2.Caption ="添加新课程可用性"

Me.lblButton3.Caption ="编辑现有可用性>

Me.lblButton4.Visible = False:Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me.cmdButton5。 Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 43然后

Me.lblTitle .Caption ="课程作业"

Me.lblButton1.Caption ="返回课程详情"

Me.lblButton2.Caption ="将员工分配到课程

Me.lblButton3.Caption =" Change Employee Assignment"

Me.lblButton4.Visible = False:Me.cmdButton4.Visible = False

Me.lbl Button5.Visible = False:Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 431 Then

Me.lblTitle.Caption ="课程作业"

Me.lblButton1.Caption ="返回课程作业"

Me.lblButton2 .Caption ="按员工导航>

Me.lblButton3.Caption ="按课程导航"

Me.lblButton4.Visible = False:Me.cmdButton4.Visible = False

Me.lblButton5.Visible = False:Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me.cmdButton6.Visible = False

ElseIf MenuLevel = 5然后

Me.lblTitle.Caption =" Manage Miscelaneous"

Me.lblButton1.Caption ="返回主菜单" ;

Me.lblButton2.Caption =" Add / Amend Companies"

Me.lblButton3.Caption =" Add / Amend Groupings"

Me.lblButton4.Caption =&quo t;添加/修改状态''"

Me.lblButton5.Visible = False:Me.cmdButton5.Visible = False

Me.lblButton6.Visible = False:Me .cmdButton6.Visible = False

ElseIf MenuLevel = 6然后

Me.lblTitle.Caption ="数据库管理员

Me.lblButton1。 Caption ="返回主菜单>

Me.lblButton2.Caption ="分配权限"

Me.lblButton3.Caption ="注销所有用户"

Me.lblButton4.Caption =" Usage Statistics"

Me.lblButton5.Caption =" Add to Comments"

Me.lblButton6。 Caption ="查看更改历史记录>

结束如果

结束Sub

Hi everyone.

I have a database which I have developed in Access 2000 which is working
nicely.

The problem is that my customer only has Access 97. I tried to convert the
database but the main menu won''t work.

I has two parts, a mainmenu and a submenu which displays the option buttons.

I believe I must have used some code which 97 dislikes but I have no idea
what (and it won''t even open in 97 to allow me to error check).

I have pasted the code below and if anyone can see any glaring mistakes
please let me know, I would be very grateful.

Thanks in advance,

John

MAIN MENU CODE
----------------------------

Option Compare Database
Dim pboolCloseAccess As Boolean
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strcomment As String
Dim strNews As String

Private Sub cmdCloseDB_Click()
RecordNavigation (1)
pboolCloseAccess = True
DoCmd.Close acForm, "fmnuMenu"
LogOnOff (0)
DoCmd.Quit
End Sub

Private Sub TempButton_Click()
If pboolCloseAccess = True Then
pboolCloseAccess = False
Else
pboolCloseAccess = True
End If
End Sub

Private Sub Form_Unload(Cancel As Integer)
''If Not pboolCloseAccess Then Cancel = True
End Sub

Private Sub Form_Load()
LogOnOff (-1)
If GetUser() = "john.ortt" Then
Me.TempButton.Visible = True
pboolCloseAccess = True
Else
Me.TempButton.Visible = False
pboolCloseAccess = False
End If
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblPeople")
If rst.RecordCount > 0 Then
rst.MoveFirst
Do Until rst.EOF
If rst![chrPLogOn] = GetUser() Then
If rst![lngPAdmin] = 1 Then
strNews = "Access Level: SYSTEM ADMINISTRATOR"
End If
End If
rst.MoveNext
Loop
End If
rst.Close
Set rst = Nothing
If strNews = "" Then strNews = "Access Level: SYSTEM USER (Limited Access)"
Forms.fmnuMenu.lblUserPermission.Caption = strNews
strNews = ""

strNews = "Hello " & UCase(Left(GetUser(), 1)) & Mid(GetUser(), 2, InStr(2,
GetUser(), ".", vbTextCompare) - 2) & ". Welcome to the Samlesbury
Logistics Training Database for BAE Systems."
Forms.fmnuMenu.lblWelcomeMessage.Caption = strNews
strNews = ""

Set rst = dbs.OpenRecordset("tblComments")
If rst.RecordCount = 0 Then
strNews = "No Comments"
Else
rst.MoveFirst
Do Until rst.EOF
strcomment = rst![dtmComDate] & vbNewLine & rst![chrComment] & vbNewLine
& vbNewLine
strNews = strcomment & strNews
rst.MoveNext
Loop
End If
rst.Close
Set rst = Nothing
Forms.fmnuMenu.lblNews.Caption = strNews
strNews = ""

Set rst = dbs.OpenRecordset("qryMyTraining")
If rst.RecordCount = 0 Then
strNews = "No Courses Planned"
Else
rst.MoveFirst
strNews = "COURSES PLANNED" & vbNewLine & vbNewLine
Do Until rst.EOF
If rst![chrPLogOn] = GetUser And rst![lngStatus] = 1 Then
strcomment = rst![dtmStartDate] & vbNewLine & rst![chrTTitle] &
vbNewLine & vbNewLine
Else
strcomment = ""
End If
strNews = strNews & strcomment
rst.MoveNext
Loop
rst.MoveFirst
strNews = strNews & vbNewLine & vbNewLine & "COURSES QUEUED" & vbNewLine &
vbNewLine
Do Until rst.EOF
If rst![chrPLogOn] = GetUser And rst![lngStatus] = 2 Then
strcomment = rst![dtmRequestDate] & vbNewLine & rst![chrTTitle] &
vbNewLine & vbNewLine
Else
strcomment = ""
End If
strNews = strNews & strcomment
rst.MoveNext
Loop
rst.MoveFirst
strNews = strNews & vbNewLine & vbNewLine & "COURSES COMPLETED" & vbNewLine
& vbNewLine
Do Until rst.EOF
If rst![chrPLogOn] = GetUser And rst![lngStatus] = 3 Then
strcomment = rst![dtmStartDate] & vbNewLine & rst![chrTTitle] &
vbNewLine & rst![chrStatus] & " " & rst![chrGrade] & vbNewLine & vbNewLine
strcomment = StrConv(strcomment, vbProperCase)
Else
strcomment = ""
End If
strNews = strNews & strcomment
rst.MoveNext
Loop
End If
rst.Close
Set rst = Nothing
dbs.Close
Set dbs = Nothing
Forms.fmnuMenu.lblTraining.Caption = strNews
ColourCells
End Sub

Private Sub Form_Timer()
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Dim strcomment As String, dtLastUsed As Date, LogOffNow As Boolean

Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblLastUsed", dbOpenSnapshot)
dtLastUsed = rst![dtmLastUsed]
LogOffNow = rst![blnLogOffNow]
rst.Close

''change the value in the next line to the number of minutes
''you want to test for. 1000 equals one second.
If DateDiff("n", dtLastUsed, Now) > 5 Or LogOffNow = True Then
If Me.Tag = "MsgSent" Then
pboolCloseAccess = True
DoCmd.Close acForm, "fmnuMenu"
Application.Quit (acQuitSaveNone)
Else
Me.Tag = "MsgSent"
DoCmd.OpenForm "frmExitNow"
End If
Else
Me.Tag = ""
End If
End Sub

Private Sub ColourCells()

Static ColArray(1 To 11, 1 To 3)

ColArray(1, 1) = 3932384 ''CORPORATE RED
ColArray(2, 1) = 2098696 ''CORPORATE BLUE
ColArray(3, 1) = 12105136 ''CORPORATE GREY
ColArray(4, 1) = 10379776 ''REGATTA BLUE
ColArray(5, 1) = 7624230 ''GREY BLUE
ColArray(6, 1) = 7301989 ''DARK GREY
ColArray(7, 1) = 7105877 ''IRON GREEN
ColArray(8, 1) = 8694703 ''OLIVE
ColArray(9, 1) = 37332 ''PUMPKIN
ColArray(10, 1) = 8422400 ''AQUA MARINE
ColArray(11, 1) = 13730304 ''SAPPHIRE BLUE

ColArray(1, 2) = 12105136 ''CORPORATE RED
ColArray(2, 2) = 16777215 ''CORPORATE BLUE
ColArray(3, 2) = 3932384 ''CORPORATE GREY
ColArray(4, 2) = 2098696 ''REGATTA BLUE
ColArray(5, 2) = 12105136 ''GREY BLUE
ColArray(6, 2) = 16777215 ''DARK GREY
ColArray(7, 2) = 12105136 ''IRON GREEN
ColArray(8, 2) = 3932384 ''OLIVE
ColArray(9, 2) = 7624230 ''PUMPKIN
ColArray(10, 2) = 2098696 ''AQUA MARINE
ColArray(11, 2) = 16777215 ''SAPPHIRE BLUE

ColArray(1, 3) = 16777215 ''CORPORATE RED
ColArray(2, 3) = 12105136 ''CORPORATE BLUE
ColArray(3, 3) = 2098696 ''CORPORATE GREY
ColArray(4, 3) = 16777215 ''REGATTA BLUE
ColArray(5, 3) = 16777215 ''GREY BLUE
ColArray(6, 3) = 12105136 ''DARK GREY
ColArray(7, 3) = 16777215 ''IRON GREEN
ColArray(8, 3) = 2098696 ''OLIVE
ColArray(9, 3) = 2098696 ''PUMPKIN
ColArray(10, 3) = 16777215 ''AQUA MARINE
ColArray(11, 3) = 0 ''SAPPHIRE BLUE

randomise = Int(11 * Rnd) + 1
''Based on: Int((HighestValue - LowestValue + 1) * Rnd) + LowestValue

Me.lblTrainingBox.BackColor = ColArray(randomise, 1)
Me.lblTrainingTitle.ForeColor = ColArray(randomise, 2)
Me.linTraining.BorderColor = ColArray(randomise, 2)
Me.lblTraining.ForeColor = ColArray(randomise, 3)

randomise = Int(11 * Rnd) + 1

Me.lblNewsBox.BackColor = ColArray(randomise, 1)
Me.lblNewsTitle.ForeColor = ColArray(randomise, 2)
Me.linNews.BorderColor = ColArray(randomise, 2)
Me.lblNews.ForeColor = ColArray(randomise, 3)

End Sub

SUB MENU CODE
-------------------------

Option Compare Database
Dim MenuLevel As Integer
Dim AdminStat As Boolean
Dim dbs As DAO.Database
Dim rst As DAO.Recordset
Private Sub Form_Open(Cancel As Integer)
Set dbs = CurrentDb
Set rst = dbs.OpenRecordset("tblPeople")
If rst.RecordCount > 0 Then
rst.MoveFirst
Do Until rst.EOF
If rst![chrPLogOn] = GetUser() Then
If rst![lngPAdmin] = 1 Then
AdminStat = True
End If
End If
rst.MoveNext
Loop
End If
rst.Close
Set rst = Nothing
Menu (0)
End Sub
Private Sub ReduceSpace()
Call UpdateActivity
End Sub
Private Sub Blink()
Me.cmdInvisible.SetFocus
Me.lblButton1.Visible = False: Me.cmdButton1.Enabled = False:
Me.cmdButton1.Visible = False
Me.lblButton2.Visible = False: Me.cmdButton2.Enabled = False:
Me.cmdButton2.Visible = False
Me.lblButton3.Visible = False: Me.cmdButton3.Enabled = False:
Me.cmdButton3.Visible = False
Me.lblButton4.Visible = False: Me.cmdButton4.Enabled = False:
Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Enabled = False:
Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Enabled = False:
Me.cmdButton6.Visible = False
End Sub

Private Sub cmdButton1_Click()
Blink
If MenuLevel = 0 Then
RecordNavigation (1): Menu (1): ReduceSpace ''User Reports
ElseIf MenuLevel = 1 Then
RecordNavigation (11): Menu (0): ReduceSpace ''Return to Main Menu
ElseIf MenuLevel = 2 Then
RecordNavigation (12): Menu (0): ReduceSpace ''Return to Main Menu
ElseIf MenuLevel = 21 Then
RecordNavigation (121): Menu (2): ReduceSpace ''Administrator Reports
ElseIf MenuLevel = 3 Then
RecordNavigation (13): Menu (0): ReduceSpace ''Return to Main Menu
ElseIf MenuLevel = 4 Then
RecordNavigation (14): Menu (0): ReduceSpace ''Return to Main Menu
ElseIf MenuLevel = 41 Then
RecordNavigation (141): Menu (4): ReduceSpace ''Courses Menu
ElseIf MenuLevel = 42 Then
RecordNavigation (142): Menu (4): ReduceSpace ''Courses Menu
ElseIf MenuLevel = 43 Then
RecordNavigation (143): Menu (4): ReduceSpace ''Courses Menu
ElseIf MenuLevel = 431 Then
RecordNavigation (1431): Menu (43): ReduceSpace ''Course Assignment
ElseIf MenuLevel = 5 Then
RecordNavigation (15): Menu (0): ReduceSpace ''Return to Main Menu
ElseIf MenuLevel = 6 Then
RecordNavigation (16): Menu (0): ReduceSpace ''Return to Main Menu
End If
End Sub
Private Sub cmdButton2_Click()
Blink
If MenuLevel = 0 Then
RecordNavigation (2): Menu (2): ReduceSpace ''Administrator Reports
ElseIf MenuLevel = 1 Then
RecordNavigation (21): Menu (1): DoCmd.OpenForm "frmMyTraining", acNormal,
, stLinkCriteria
ElseIf MenuLevel = 2 Then
RecordNavigation (22): Menu (2): DoCmd.OpenForm "frmMyTraining", acNormal,
, stLinkCriteria
ElseIf MenuLevel = 21 Then
RecordNavigation (221): Menu (21): MsgBox ("View Grades by Course")
ElseIf MenuLevel = 3 Then
RecordNavigation (23): Menu (3): DoCmd.OpenForm "frmPeople", , ,
stLinkCriteria, acFormAdd
ElseIf MenuLevel = 4 Then
RecordNavigation (24): Menu (41): ReduceSpace ''Add / Amend Course Details
ElseIf MenuLevel = 41 Then
RecordNavigation (241): Menu (41): DoCmd.OpenForm "frmTraining", , ,
stLinkCriteria, acFormAdd
ElseIf MenuLevel = 42 Then
RecordNavigation (242): Menu (42): DoCmd.OpenForm "frmSchedule", , ,
stLinkCriteria, acFormAdd
ElseIf MenuLevel = 43 Then
RecordNavigation (243): Menu (43): DoCmd.OpenForm "frmAllocationMenu", , ,
stLinkCriteria, acFormAdd
ElseIf MenuLevel = 431 Then
RecordNavigation (2431): Menu (431): MsgBox ("Navigate by Employee")
ElseIf MenuLevel = 5 Then
RecordNavigation (25): Menu (5): MsgBox ("Add / Amend Companies")
ElseIf MenuLevel = 6 Then
RecordNavigation (26): Menu (6): MsgBox ("Assign Permissions")
End If
End Sub
Private Sub cmdButton3_Click()
Blink
If MenuLevel = 0 Then
RecordNavigation (3): Menu (3): ReduceSpace ''Manage Employee Details
ElseIf MenuLevel = 1 Then
RecordNavigation (31): Menu (1): DoCmd.OpenForm "frmCourseSched", acNormal,
, stLinkCriteria
ElseIf MenuLevel = 2 Then
RecordNavigation (32): Menu (2): DoCmd.OpenForm "frmCourseSched", acNormal,
, stLinkCriteria ''Used until an group schedule form is produced.
ElseIf MenuLevel = 21 Then
RecordNavigation (321): Menu (21): MsgBox ("View Grades by Candidate")
ElseIf MenuLevel = 3 Then
RecordNavigation (33): Menu (3): DoCmd.OpenForm "frmPeople", acNormal, ,
stLinkCriteria
ElseIf MenuLevel = 4 Then
RecordNavigation (34): Menu (4): Menu (42): ReduceSpace ''Add / Amend Course
Schedule
ElseIf MenuLevel = 41 Then
RecordNavigation (341): Menu (41): DoCmd.OpenForm "frmTraining", acNormal,
, stLinkCriteria
ElseIf MenuLevel = 42 Then
RecordNavigation (342): Menu (42): DoCmd.OpenForm "frmSchedule", acNormal,
, stLinkCriteria
ElseIf MenuLevel = 43 Then
RecordNavigation (343): Menu (431): ReduceSpace
ElseIf MenuLevel = 431 Then
RecordNavigation (3431): Menu (431): MsgBox ("Navigate by Course")
ElseIf MenuLevel = 5 Then
RecordNavigation (35): Menu (5): MsgBox ("Add / Amend Groupings")
ElseIf MenuLevel = 6 Then
RecordNavigation (36): Menu (6): MsgBox ("Log Off All Users")
End If
End Sub
Private Sub cmdButton4_Click()
Blink
If MenuLevel = 0 Then
RecordNavigation (4): Menu (4): ReduceSpace ''Manage Course Details
ElseIf MenuLevel = 1 Then
RecordNavigation (31): Menu (1): DoCmd.OpenForm "frmCourseSched", acNormal,
, stLinkCriteria ''Used until an individual Grades form is produced.
ElseIf MenuLevel = 2 Then
RecordNavigation (32): Menu (2): DoCmd.OpenForm "frmCourseSched", acNormal,
, stLinkCriteria ''Used until an group Grades form is produced.
ElseIf MenuLevel = 21 Then
RecordNavigation (321): Menu (21): MsgBox ("Not Used")
ElseIf MenuLevel = 3 Then
RecordNavigation (33): Menu (3): MsgBox ("Not Used")
ElseIf MenuLevel = 4 Then
RecordNavigation (34): Menu (43): ReduceSpace ''Add / Amend Course Delagates
ElseIf MenuLevel = 41 Then
RecordNavigation (341): Menu (41): MsgBox ("Not Used")
ElseIf MenuLevel = 42 Then
RecordNavigation (342): Menu (42): MsgBox ("Not Used")
ElseIf MenuLevel = 43 Then
RecordNavigation (343): Menu (43): MsgBox ("Not Used")
ElseIf MenuLevel = 431 Then
RecordNavigation (3431): Menu (431): MsgBox ("Not Used")
ElseIf MenuLevel = 5 Then
RecordNavigation (35): Menu (5): MsgBox ("Add/Ammend Status''")
ElseIf MenuLevel = 6 Then
RecordNavigation (36): Menu (6): MsgBox ("Usage Statistics")
End If
End Sub
Private Sub cmdButton5_Click()
Blink
If MenuLevel = 0 Then
RecordNavigation (5): Menu (5): ReduceSpace ''Manage Miscelaneous
ElseIf MenuLevel = 1 Then
RecordNavigation (31): Menu (1): DoCmd.OpenForm "frmCourseQueuesMenu",
acNormal, , stLinkCriteria
ElseIf MenuLevel = 2 Then
RecordNavigation (32): Menu (2): DoCmd.OpenForm "frmCourseQueuesMenu",
acNormal, , stLinkCriteria
ElseIf MenuLevel = 21 Then
RecordNavigation (321): Menu (21): MsgBox ("Not Used")
ElseIf MenuLevel = 3 Then
RecordNavigation (33): Menu (3): MsgBox ("Not Used")
ElseIf MenuLevel = 4 Then
RecordNavigation (34): Menu (4): MsgBox ("Not Used")
ElseIf MenuLevel = 41 Then
RecordNavigation (341): Menu (41): MsgBox ("Not Used")
ElseIf MenuLevel = 42 Then
RecordNavigation (342): Menu (42): MsgBox ("Not Used")
ElseIf MenuLevel = 43 Then
RecordNavigation (343): Menu (43): MsgBox ("Not Used")
ElseIf MenuLevel = 431 Then
RecordNavigation (3431): Menu (431): MsgBox ("Not Used")
ElseIf MenuLevel = 5 Then
RecordNavigation (35): Menu (5): MsgBox ("Not Used")
ElseIf MenuLevel = 6 Then
RecordNavigation (36): Menu (6): MsgBox ("Add to Comments")
End If
End Sub
Private Sub cmdButton6_Click()
Blink
If MenuLevel = 0 Then
RecordNavigation (6): Menu (6): ReduceSpace ''Database Administration
ElseIf MenuLevel = 1 Then
RecordNavigation (31): Menu (1): MsgBox ("Not Used")
ElseIf MenuLevel = 2 Then
RecordNavigation (32): Menu (2): MsgBox ("Not Used")
ElseIf MenuLevel = 21 Then
RecordNavigation (321): Menu (21): MsgBox ("Not Used")
ElseIf MenuLevel = 3 Then
RecordNavigation (33): Menu (3): MsgBox ("Not Used")
ElseIf MenuLevel = 4 Then
RecordNavigation (34): Menu (4): MsgBox ("Not Used")
ElseIf MenuLevel = 41 Then
RecordNavigation (341): Menu (41): MsgBox ("Not Used")
ElseIf MenuLevel = 42 Then
RecordNavigation (342): Menu (42): MsgBox ("Not Used")
ElseIf MenuLevel = 43 Then
RecordNavigation (343): Menu (43): MsgBox ("Not Used")
ElseIf MenuLevel = 431 Then
RecordNavigation (3431): Menu (431): MsgBox ("Not Used")
ElseIf MenuLevel = 5 Then
RecordNavigation (35): Menu (5): MsgBox ("Not Used")
ElseIf MenuLevel = 6 Then
RecordNavigation (36): Menu (6): MsgBox ("View Change History")
End If
End Sub
Sub Menu(MenuVar)
MenuLevel = MenuVar
Me.lblButton1.Visible = True: Me.cmdButton1.Enabled = True:
Me.cmdButton1.Visible = True: Me.lblButton1.ForeColor = vbRed
Me.lblButton2.Visible = True: Me.cmdButton2.Enabled = True:
Me.cmdButton2.Visible = True
Me.lblButton3.Visible = True: Me.cmdButton3.Enabled = True:
Me.cmdButton3.Visible = True
Me.lblButton4.Visible = True: Me.cmdButton4.Enabled = True:
Me.cmdButton4.Visible = True
Me.lblButton5.Visible = True: Me.cmdButton5.Enabled = True:
Me.cmdButton5.Visible = True
Me.lblButton6.Visible = True: Me.cmdButton6.Enabled = True:
Me.cmdButton6.Visible = True
If MenuLevel = 0 Then
If AdminStat = False Then
Me.lblButton1.Visible = True: Me.cmdButton1.Visible = True
Me.lblButton2.Visible = False: Me.cmdButton2.Visible = False
Me.lblButton3.Visible = False: Me.cmdButton3.Visible = False
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
End If
Me.lblTitle.Caption = "Main Menu"
Me.lblButton1.Caption = "User Reports": Me.lblButton1.ForeColor =
vbBlack
Me.lblButton2.Caption = "Administrator Reports"
Me.lblButton3.Caption = "Manage Employee Details"
Me.lblButton4.Caption = "Manage Course Details"
Me.lblButton5.Caption = "Manage Miscelaneous"
Me.lblButton6.Caption = "Database Administration"
ElseIf MenuLevel = 1 Then
Me.lblTitle.Caption = "My Reports"
Me.lblButton1.Caption = "Return to Main Menu"
Me.lblButton2.Caption = "My Training Details"
Me.lblButton3.Caption = "Courses Scheduled"
Me.lblButton4.Caption = "My Grades"
Me.lblButton5.Caption = "View Queue for Courses"
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 2 Then
Me.lblTitle.Caption = "Administrator Reports"
Me.lblButton1.Caption = "Return to Main Menu"
Me.lblButton2.Caption = "View Training Details"
Me.lblButton3.Caption = "View Courses Scheduled"
Me.lblButton4.Caption = "View Grades"
Me.lblButton5.Caption = "View Queue for Courses"
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 21 Then
Me.lblTitle.Caption = "Administrator Reports - Grades"
Me.lblButton1.Caption = "Return to Admin Reports"
Me.lblButton2.Caption = "View Grades by Course"
Me.lblButton3.Caption = "View Grades by Candidate"
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 3 Then
Me.lblTitle.Caption = "Employee Details Menu"
Me.lblButton1.Caption = "Return to Main Menu"
Me.lblButton2.Caption = "Add New Employee"
Me.lblButton3.Caption = "Edit Existing Employee"
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 4 Then
Me.lblTitle.Caption = "Courses Menu"
Me.lblButton1.Caption = "Return to Main Menu"
Me.lblButton2.Caption = "Add / Amend Course Details"
Me.lblButton3.Caption = "Add / Amend Course Schedule"
Me.lblButton4.Caption = "Add / Amend Course Delegates"
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 41 Then
Me.lblTitle.Caption = "Course Details"
Me.lblButton1.Caption = "Return to Course Details"
Me.lblButton2.Caption = "Create New Course"
Me.lblButton3.Caption = "Edit Existing Course"
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 42 Then
Me.lblTitle.Caption = "Course Availability"
Me.lblButton1.Caption = "Return to Course Details"
Me.lblButton2.Caption = "Add New Course Availability"
Me.lblButton3.Caption = "Edit Existing Availability"
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 43 Then
Me.lblTitle.Caption = "Course Assignment"
Me.lblButton1.Caption = "Return to Course Details"
Me.lblButton2.Caption = "Assign Employee to Course"
Me.lblButton3.Caption = "Change Employee Assignment"
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 431 Then
Me.lblTitle.Caption = "Course Assignment"
Me.lblButton1.Caption = "Return to Course Assignment"
Me.lblButton2.Caption = "Navigate by Employee"
Me.lblButton3.Caption = "Navigate by Course"
Me.lblButton4.Visible = False: Me.cmdButton4.Visible = False
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 5 Then
Me.lblTitle.Caption = "Manage Miscelaneous"
Me.lblButton1.Caption = "Return to Main Menu"
Me.lblButton2.Caption = "Add / Amend Companies"
Me.lblButton3.Caption = "Add / Amend Groupings"
Me.lblButton4.Caption = "Add / Amend Status''"
Me.lblButton5.Visible = False: Me.cmdButton5.Visible = False
Me.lblButton6.Visible = False: Me.cmdButton6.Visible = False
ElseIf MenuLevel = 6 Then
Me.lblTitle.Caption = "Database Admin"
Me.lblButton1.Caption = "Return to Main Menu"
Me.lblButton2.Caption = "Assign Permissions"
Me.lblButton3.Caption = "Log Off All Users"
Me.lblButton4.Caption = "Usage Statistics"
Me.lblButton5.Caption = "Add to Comments"
Me.lblButton6.Caption = "View Change History"
End If
End Sub

推荐答案

" ; John Ortt <乔****** @ noemailsuppliedasdontwantspam.com>在消息中写道

news:44 ********** @glkas0286.greenlnk.net ...
"John Ortt" <jo******@noemailsuppliedasdontwantspam.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
大家好。

问题是我的客户只有Access 97.我试图转换
数据库,但主菜单不起作用。

我有两个部分,一个主菜单和一个子菜单,显示选项
按钮。

我相信我必须使用一些97不喜欢的代码,但我不知道
什么(它甚至不会在97开放,允许我进行错误检查)。
Hi everyone.

I have a database which I have developed in Access 2000 which is working
nicely.

The problem is that my customer only has Access 97. I tried to convert
the database but the main menu won''t work.

I has two parts, a mainmenu and a submenu which displays the option
buttons.

I believe I must have used some code which 97 dislikes but I have no idea
what (and it won''t even open in 97 to allow me to error check).



你好约翰,


我不确定它是否可能,但你是否尝试将对象从

导入你的2k文件到97?我没有设施可以尝试但是如果你还没有尝试的话,它可能是值得一试的。


问候,

Keith。
www.keithwilby.com


嗨Keith,


感谢您的快速回复。


我怎么样?去导入我的2k物体?

你的意思是手动拖动和放大将对象从一个窗口拖放到另一个窗口?


我还应该提到97数据库在2000年打开正常,只是没有

97本身。 />

" Keith Wilby" <他** @ there.com>在消息中写道

news:44 ******** @ glkas0286.greenlnk.net ...
Hi Keith,

Thanks for the prompt reply.

How would I go about importing my 2k objects?
Do you mean manually drag & dropthe objects from one window to the other?

I should also mention that the 97 database opens fine in 2000, just not with
97 itself.

"Keith Wilby" <he**@there.com> wrote in message
news:44********@glkas0286.greenlnk.net...
" John Ortt" <乔****** @ noemailsuppliedasdontwantspam.com>在消息中写道
新闻:44 ********** @glkas0286.greenlnk.net ...
"John Ortt" <jo******@noemailsuppliedasdontwantspam.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
大家好。

我有我在Access 2000中开发的数据库很好用。

问题是我的客户只有Access 97.我试图转换数据库但是主要的菜单不起作用。

我有两个部分,一个主菜单和一个子菜单,显示选项
按钮。

我相信我一定用过一些97不喜欢的代码,但我不知道是什么(它甚至不会在97开放,允许我进行错误检查)。
Hi everyone.

I have a database which I have developed in Access 2000 which is working
nicely.

The problem is that my customer only has Access 97. I tried to convert
the database but the main menu won''t work.

I has two parts, a mainmenu and a submenu which displays the option
buttons.

I believe I must have used some code which 97 dislikes but I have no idea
what (and it won''t even open in 97 to allow me to error check).


嗨约翰,

我不确定它是否可能,但您是否尝试将对象
从2k文件导入97?我没有尝试过的设施,但是如果你还没有尝试的话,它可能值得一试。

问候,
基思。
www.keithwilby.com



John Ortt在消息中写道< 44 ********** @ glkas0286.greenlnk.net> :
John Ortt wrote in message <44**********@glkas0286.greenlnk.net> :
Hi Keith,

Thanks for the prompt reply.

How would I go about importing my 2k objects?
Do you mean manually drag & dropthe objects from one window to the other?

I should also mention that the 97 database opens fine in 2000, just not with
97 itself.

"Keith Wilby" <他** @ there.com> wrote in message
news:44********@glkas0286.greenlnk.net...
Hi Keith,

Thanks for the prompt reply.

How would I go about importing my 2k objects?
Do you mean manually drag & dropthe objects from one window to the other?

I should also mention that the 97 database opens fine in 2000, just not with
97 itself.

"Keith Wilby" <he**@there.com> wrote in message
news:44********@glkas0286.greenlnk.net...
"John Ortt" <jo******@noemailsuppliedasdontwantspam.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
"John Ortt" <jo******@noemailsuppliedasdontwantspam.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
Hi everyone.

I have a database which I have developed in Access 2000 which is working
nicely.

The problem is that my customer only has Access 97. I tried to convert
the database but the main menu won’’t work.

I has two parts, a mainmenu and a submenu which displays the option
buttons.

I believe I must have used some code which 97 dislikes but I have no idea
what (and it won’’t even open in 97 to allow me to error check).
Hi everyone.

I have a database which I have developed in Access 2000 which is working
nicely.

The problem is that my customer only has Access 97. I tried to convert
the database but the main menu won''t work.

I has two parts, a mainmenu and a submenu which displays the option
buttons.

I believe I must have used some code which 97 dislikes but I have no idea
what (and it won''t even open in 97 to allow me to error check).


Hi John,

I’’m not sure if it’’s possible but have you tried importing the objects from
your 2k file into 97? I don’’t have the facilities to try it but it might
be worth a go if you haven’’t already tried it.

Regards,
Keith.
www.keithwilby.com




Unless someone spots something (which I don’’t) ;-) - could it be an

idea

to comment every routine in the module, then try to open it in 97, and

if it works (you’’re able to open and edit it), try to uncomment

"incrementally".


If it doesn’’t work - you can’’t edit the commented code, then there’’s

perhaps something other to look for.


Could be some corruption? I’’m sure it wouldn’’t hurt if you run

/decompile on a *copy* of the database to just check?


See the following link for a step by step instruction
http://www.granite.ab.ca/access/decompile.htm


--

Roy-Vidar



Unless someone spots something (which I don''t) ;-) - could it be an
idea
to comment every routine in the module, then try to open it in 97, and
if it works (you''re able to open and edit it), try to uncomment
"incrementally".

If it doesn''t work - you can''t edit the commented code, then there''s
perhaps something other to look for.

Could be some corruption? I''m sure it wouldn''t hurt if you run
/decompile on a *copy* of the database to just check?

See the following link for a step by step instruction
http://www.granite.ab.ca/access/decompile.htm

--
Roy-Vidar


这篇关于我的数据库不会转换为97!的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆