Hello there!

i am quite new to VB6 (Been learning it for 3 months at college) and im finding it very interesting and simple to program things with it, but i am however struggling with this perticular piece of work.

What i have created for a college assignment is a Hurricane category program. It works by asking the user to input the location(s) and windspeed(s) of various hurricanes.
Once the user has done this, the program tests the criteria to see what category each storm is, and what effect each category will have.

to get input from the user i first ask them how many storms they are watching, i then ask them to input the windspeed and locations. The information is stored in an array module so it can be used in other forms.

I also have a Previous / Next form with buttons that allow the user to see all of the storms they have entered with labels describing what course of action
depending on the category.

The Problem:

Here is the code to get input from the user.

VB Code:
  1. amount(x) = InputBox("Please enter the amount of storms you are watching")
  2.         If amount(x) < 1 Then
  3.           MsgBox ("please enter a value")
  4.         End If
  5.    
  6.  
  7.  
  8.     For x = 0 To amount(x) - 1
  9.          location(x) = InputBox("Please enter the location")
  10.          speed(x) = InputBox("Please enter the speed in MPH")
  11.          
  12.       If speed(x) >= 74 And speed(x) <= 96 Then
  13.          Category(x) = ("1")
  14.          
  15.       ElseIf speed(x) >= 97 And speed(x) <= 110 Then
  16.          Category(x) = ("2")
  17.        
  18.       ElseIf speed(x) >= 111 And speed(x) <= 130 Then
  19.          Category(x) = ("3")
  20.          
  21.       ElseIf speed(x) >= 131 And speed(x) <= 155 Then
  22.          Category(x) = ("4")
  23.        
  24.       ElseIf speed(x) > 155 Then
  25.          Category(x) = ("5")
  26.  
  27.    
  28.       End If
  29.     Next
  30.  
  31.  
  32.    End Sub

This part works brilliantly, the data the user inputs is displayed in listboxes in the next form.

My problem lies here with my Previous / Next form

VB Code:
  1. Private Sub CmdNext_Click()
  2.  
  3.   lbl5.Visible = False
  4.  
  5.  
  6. 'Counter control variable to display the next set of information
  7. 'entered by the user. A label is displayed if the category is 5, it
  8. 'tells the user to "EVACUATE"
  9.  
  10.  
  11.    If x < amount(x) Then
  12.     amount(x) = amount(x) + 1
  13.   Else
  14.     amount(x) = 0
  15.   End If
  16.  
  17.   txtCategory.Text = Category(x)
  18.   TxtLocation.Text = location(x)
  19.  
  20. If txtCategory = "5" Then
  21.     lbl5.Visible = True
  22.   End If
  23. End Sub

VB Code:
  1. Private Sub CmdPrev_Click()
  2.  
  3. lbl5.Visible = False
  4.  
  5. 'Counter control variable to display the previous set of information
  6. 'entered by the user. A label is displayed if the category is 5, it
  7. 'tells the user to "EVACUATE"
  8.  
  9.  
  10.   If x > amount(x) Then
  11.     x = amount(x) - 1
  12.   Else
  13.     x = 0
  14.   End If
  15.  
  16.   txtCategory.Text = Category(x)
  17.   TxtLocation.Text = location(x)
  18.  
  19.    
  20.    If txtCategory = "5" Then
  21.     lbl5.Visible = True
  22.   End If
  23.  
  24. End Sub


It will not loop round the data, ive tried all different combinations but i just cannot do it =\