By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,572 Members | 2,949 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,572 IT Pros & Developers. It's quick & easy.

My Database won't convert to 97!

P: n/a
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
Mar 29 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
"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 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
Mar 29 '06 #2

P: n/a
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...
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

Mar 29 '06 #3

P: n/a
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" <he**@there.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 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
Mar 29 '06 #4

P: n/a
"John Ortt" <jo******@noemailsuppliedasdontwantspam.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?


Well no, just the File ... Import menu item. I've no idea if it will work
but it's all I can think of to try.

Keith.
Mar 29 '06 #5

P: n/a
Thanks Keith,

I see what you mean now, I don't think I had my brain in gear when I first
read your post.

I will give Roy's idea of commenting out the code a try and if it fails I'll
try the import tool.

Thanks again for the help.

John

"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...
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?


Well no, just the File ... Import menu item. I've no idea if it will work
but it's all I can think of to try.

Keith.

Mar 29 '06 #6

P: n/a
Thanks for the suggestion Roy,

I'll give it a try.

"RoyVidar" <ro*************@yahoo.no> wrote in message
news:mn***********************@yahoo.no...
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

Mar 29 '06 #7

P: n/a
Bri

Keith Wilby wrote:
"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 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


Keith,
I don't think this will work as AC97 won't recognize the AC2K formatted
file. It might work the other way around, Export from the AC2K to an
empty AC97 file (created with AC97).

John,
You say that the 'converted to AC97' mdb will open in AC2K? Does it give
you the dialog to 'Convert' or 'Open Read Only'? If not, then it could
still be an AC2K format file.

--
Bri
Mar 29 '06 #8

P: n/a
"Bri" <no*@here.com> wrote in message
news:OOAWf.201288$B94.144678@pd7tw3no...


Keith,
I don't think this will work as AC97 won't recognize the AC2K formatted
file. It might work the other way around, Export from the AC2K to an
empty AC97 file (created with AC97).


I thought that might be the case but didn't know for sure so thought it was
worth a try.

Mar 30 '06 #9

P: n/a
Thanks for the help everyone....... I have got it sorted now.

First of all I checked if the 97 file was read only when I opened it in
Access 2003 (and it was).

So I then commented out all my code in the 2003 version and then converted
the database to 97 again.

The only difference was that I got a message saying the code had been
converted when I opened the 97 database (which I didn't get the first time).

I then went in and removed all the comment tags and hey presto it works
fine.

Obviously just a glitch but it had me worried for a while there.

Thanks again,

John
"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).

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

Mar 30 '06 #10

P: n/a
"John Ortt" <jo******@noemailsuppliedasdontwantspam.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
Thanks for the help everyone....... I have got it sorted now.

First of all I checked if the 97 file was read only when I opened it in
Access 2003 (and it was).

So I then commented out all my code in the 2003 version and then converted
the database to 97 again.

The only difference was that I got a message saying the code had been
converted when I opened the 97 database (which I didn't get the first
time).

I then went in and removed all the comment tags and hey presto it works
fine.


Duly noted, thanks for letting us know.

Keith.
Mar 30 '06 #11

P: n/a
I don't think you'll have much luck _importing_ from a later version to an
earlier one. You might be able to do what you want with CopyObject... from
the more recent version to the earlier one. (Maybe!)

That's surely a lot of code to expect people to look over in detail, on the
off chance that they might spot some code that won't work in A97.

(Almost just as an idle) question: Did you open a module in the more recent
version, and on the menu Debug | Compile to see if there are any compilation
errors. Those will often defeat an attempt to convert.

Larry Linson
Microsoft Access MVP

"John Ortt" <jo******@noemailsuppliedasdontwantspam.com> wrote in message
news:44**********@glkas0286.greenlnk.net...
Thanks Keith,

I see what you mean now, I don't think I had my brain in gear when I first
read your post.

I will give Roy's idea of commenting out the code a try and if it fails
I'll try the import tool.

Thanks again for the help.

John

"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...
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?


Well no, just the File ... Import menu item. I've no idea if it will
work but it's all I can think of to try.

Keith.


Mar 30 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.