Solved

VBasic update

Posted on 2000-05-04
3
196 Views
Last Modified: 2010-05-02
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
Comment
Question by:Jenny30
  • 2
3 Comments
 
LVL 5

Accepted Solution

by:
AnswerTheMan earned 100 total points
ID: 2779152
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
 

Expert Comment

by:sniperrus
ID: 2780650
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
 
LVL 5

Expert Comment

by:AnswerTheMan
ID: 2782952
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question