Link to home
Start Free TrialLog in
Avatar of Jenny30
Jenny30

asked on

VBasic update

ok, i have my second program running and it goes to the third form...now i am stuck...i do not know where to begin with my coding to get started.I have the interface already started.I have 2 option buttons and they are:optVisa which is a Visa card option and optMast which is my Mastercard option...I also have 2 command buttons:cmdRec which primts my receipt of all the customers information(address,item purchased,price,tax, total price,shipping information,purchase order number,etc.) and cmdOrder which will calculate my total price where the cmdRec button can print it...and then i have text boxes for the user to enter in their information needed for shipping...this is my second form and it is fine...my third form and what i have so far on it is at the bottom of the page...like i said i do not want this program done for me...i just want some hints on how to start the coding...

Private Sub Check1_Click()
    txtComment.Visible = True
End Sub

Private Sub cmdRum_Click()
    Dim Song As String
    Dim Quantity As Integer
    Dim Price As Integer
    Dim Genre As String
    Dim x As Boolean
    Dim strPrompt As String
    x = True
   
    Open "a:\music store.txt" For Input As #1
    Do While Song <> Combo1.Text
    Input #1, Song, Quantity, Price, Genre
    Loop
   
   
    If Song <> Combo1.Text Then
       MsgBox ("bet you wish I had it")
       x = False
    End If
   
    If txtQuantity > Quantity Then
     Prompt = "Sold Out"
       x = False
       
       Else
        If Option1.Value And Genre = "Tape" Then
        strPrompt = "Not available as CD"
           
            Else
             If Option2.Value And Genre = "CD" Then
             strPrompt = "Not available as Tape"
       End If
         If strPrompt <> vbNullString Then MsgBox strPrompt
               
                If x Then
                Unload Form2
                Form3.Show
                End If
           End If
        End If
   
     
         
     Close #1
End Sub

THIRD FORM

Private Sub cmdOrder_Click()

End Sub

Private Sub cmdRec_Click()
lblT = Song
lblP = Val(txtQuantity) * Val(Amount)
End Sub

Private Sub PurchaseOrderNo()
    lblPur2 = Int((5000 - 500 + 1) * Rnd + 500)
End Sub

Private Sub optVisa_Click()

End Sub

ASKER CERTIFIED SOLUTION
Avatar of AnswerTheMan
AnswerTheMan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sniperrus
sniperrus

I haven't dealt with flat file access in VB, but that first loop you have looks like it may be infinite, it only checks if the strings match it doesn't check if the end of the file is reached. Then again VB might do that for you, as I said I really don't know (in other languages it would be infinite thuogh that's why I thought about it).
Jenny30 :
i'm surprized to be awarded points and A grade for this answer.
it was meant to be a comment.
you may find it hard to belive, but belive it : even after  more then 12 years of code-writing, and hundreds of projects behind me - i expierince the same
filling that i felt in your question - when i start a new project.
*BUT* - my experience made me know how to traet that feeling in proportion and ALL I WANTED is to pass that experience to you. that is all.

tnx, and i wish you success. EE is a good place to get help on uncleared POINTS here and there.