Results 1 to 7 of 7

Thread: Airline Program

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2006
    Posts
    4

    Question Airline Program

    Hello, I'm trying to create a program wich has one picture box, 2 input boxes and a start button, The code is for an airline program which when you enter the i.d's of people into an input box the i.d's should be displayed on screen unless the i.d's aren't there, it should also take the name from the i.d's and display them in the picture box too, there is also there is another input box for the seat number which should let a person enter a seat number between 1 and 5 and if higher than this a message box will be displayed, This is the code I have so far, any help on improveing it will be appricated

    Private Sub cmdstart_Click()

    Dim i_d
    Dim seat As Integer
    Dim nme As String

    picdisplay.Print "Booking confrimation"
    picdisplay.Print "Flight number = HA468"

    Do
    i_d = InputBox("What is your I.D?")
    If i_d = "WallaceW468PO1" Or i_d = "LauderH48PO2" Or i_d = "CarnegieA468PO3" Or i_d = "ScottW468PO4" Or i_d = "DeBruisR468PO5" Then
    picdisplay.Print "ID"; i_d
    End If

    If i_d <> "WallaceW468PO1" Or i_d <> "LauderH48PO2" Or i_d <> "CarnegieA468PO3" Or i_d <> "ScottW468PO4" Or i_d <> "DeBruisR468PO5" Then
    MsgBox ("Please Re-enter your i_d")
    End If
    Loop Until i_d = "WallaceW468PO1" Or i_d = "LauderH48PO2" Or i_d = "CarnegieA468PO3" Or i_d = "ScottW468PO4" Or i_d = "DeBruisR48PO5"

    --in this section there should be code to display the name in the picture box which is taken from th i.d for exzample ScottW468PO4 should display the name Scott.


    Do
    Dim counter(1 To 5)
    seat = InputBox("What is your seat number?")
    If seat < 6 And seat > 0 Then
    picdisplay.Print "Seat Number"; seat
    End If

    If seat > 5 Or seat < 1 Then
    MsgBox ("Please re-enter your seat number")
    End If
    Loop Until seat < 6 And seat > 0


    End Sub

    Thanks!!
    Last edited by S.J.Roger; Dec 22nd, 2006 at 12:15 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width