Solved

VBasic update

Posted on 2000-05-04
3
197 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

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!

Question has a verified solution.

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

Suggested Solutions

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

749 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