kryssy23
05-24-2009, 05:05 PM
Hey guys,
I am using VB via microsoft access 07. I am trying to make a menu but i cant seem to get it to work properly. the menu needs to look something like this...
Lessons
---------------------
1. cat
2. jet
3. wind
Hire
---------------------
4. cat
5. jet
6. wind
Reports
--------------------
7. daily report
8.quit
thats hopefully the end result... i keep getting errors when trying to make the menu... here is what i have so far
Sub main()
Dim choice As Long
Dim menuChoice As Long
Dim exitChoice As Long
Dim choice1 As Long
Dim choice2 As Long
Dim choice3 As Long
Dim menu As String
choice = ""
While menuChoice <> exitChoice
Debug.Print menu;
choice = InputBox("1. lessons 2.hire 3. report")
If menuChoice = choice1 Then
lesson 'lesson is the name of another sub
Else
If menuChoice = choice2 Then
hire 'hire is the name of another sub
Else
If menuChoice = choice3 Then
report 'report is the name of another sub
End If
End If
End If
Wend
End Sub
any help would be great:thumbsup:
I am using VB via microsoft access 07. I am trying to make a menu but i cant seem to get it to work properly. the menu needs to look something like this...
Lessons
---------------------
1. cat
2. jet
3. wind
Hire
---------------------
4. cat
5. jet
6. wind
Reports
--------------------
7. daily report
8.quit
thats hopefully the end result... i keep getting errors when trying to make the menu... here is what i have so far
Sub main()
Dim choice As Long
Dim menuChoice As Long
Dim exitChoice As Long
Dim choice1 As Long
Dim choice2 As Long
Dim choice3 As Long
Dim menu As String
choice = ""
While menuChoice <> exitChoice
Debug.Print menu;
choice = InputBox("1. lessons 2.hire 3. report")
If menuChoice = choice1 Then
lesson 'lesson is the name of another sub
Else
If menuChoice = choice2 Then
hire 'hire is the name of another sub
Else
If menuChoice = choice3 Then
report 'report is the name of another sub
End If
End If
End If
Wend
End Sub
any help would be great:thumbsup: