Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

VBasic 6.0 help

Posted on 2000-05-06
4
Medium Priority
?
166 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
[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
4 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2784742
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 360 total points
ID: 2784759
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
ID: 2784763
i'm sure thats what it should read
0
 

Author Comment

by:Jenny30
ID: 2784773
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
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…
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…
Suggested Courses

704 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