Solved

VBasic 6.0 help

Posted on 2000-05-06
4
157 Views
Last Modified: 2010-05-02
ok i only have 90 pts left so what i need now is how to get my tax and total price to print in my picture box
btw...my State code will be going in the txtState textbox

here is what i have

Private Function tax() As Single
Dim sTax As Single

If txtState <> "MS" Then
     sTax = 0
Else
    If txtState = MS Then
       sTax = Price * 0.07
    End If
End If
tax = sTax
0
Comment
Question by:Jenny30
  • 2
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
you should be able to do it the way you printed all the other information...

btw, even if i help you solve this, give these points to AZWolf
0
 
LVL 9

Accepted Solution

by:
GivenRandy earned 90 total points
Comment Utility
Like this:

Pic1.Print Tax

Also, you can reduce your Tax() function to the following -- it is smaller, faster, easier to read, etc.

Private Function Tax() As Single
    If txtState <> "MS" Then
        Tax = 0
    Else
        Tax = Price * 0.07
    End If
End Function

This is PROVIDED you meant the second

   If txtState = MS Then

to be

   If txtState = "MS" Then

instead.  Did you?
0
 
LVL 28

Expert Comment

by:AzraSound
Comment Utility
i'm sure thats what it should read
0
 

Author Comment

by:Jenny30
Comment Utility
thank you...it works now...everyone has been so helpful to me...i intend to take VBasic as far as i can b/c i want to know it like an expert...this is my first programming language that i have taking at school...it is a requirement in the LAN Networking curriculum...we went over If,then,else and Case statements;Data files;the fartherest we got were Loops, but i intend to do a little studying on my own...i believe the language is really interesting and intend to take it farther than what i have learned...Thank you all for your help...
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

743 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now