Results 1 to 4 of 4

Thread: Program help!

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2010
    Posts
    14

    Program help!

    Hey im writing a small prgam, however im a little stuck. One of the forms im writing displays a kids price and an adults price, as well as this the user can input how many kids or adults item /she needs. The problem is that the cost of the items needs to be carried across to another form where extra items can be added thus adding more to the price. How can i send the total to the next page where it becomes the grand total?

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Program help!

    Moved From The CodeBank

  3. #3
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Program help!

    Are you talking about VB forms or web forms?

    In VB any control can be queried on any form by preceding the control's name with the form name.
    Example from Form2: Form1.Text1.Text = "Hello World"
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  4. #4
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: Program help!

    Or, you can store the Total using a Global/Public variable. So, that, you will be able to access it from anywhere in the program...

    For declaring a Global/Public variable, declare the variable inside a Module, using a Public keyword.

    Example(inside Module1):
    Code:
    Public intTotal as Integer
    ...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width