• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 205
  • Last Modified:

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

0
Jenny30
Asked:
Jenny30
  • 2
1 Solution
 
AnswerTheManCommented:
write some, check some, and so on...
say to yourself out loud what you want that will happened in any event. once you say it or write it in plain words - you'll know what you have to do. write some, check some....and remmeber : every jurney starts with one little step. step by step you'll build it by your own.
0
 
sniperrusCommented:
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).
0
 
AnswerTheManCommented:
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.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now