Results 1 to 4 of 4

Thread: object required

  1. #1

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401

    object required

    please help this VB programmer get off the ground in web programming!

    all i'm trying to do is have a text box display the result of a box indicating quantity, and a drop down of products, with the price in the value fields. too simple compared to some of the code i've seen pasted here!

    anyway, here's what i had originally:
    Code:
    function AddTotal
    	txtTotalDue.value = txtOrderQty01.value * sltOrderProduct01.value
    end function
    when calling this function from "sltOrderProduct01_onchange", all that happens is I get an "Object Required" error message.

    I then decided to make it even simpler and made it:
    Code:
    txtTotalDue.value = 100 * 24
    but this gives me the same error message!
    i know that txtTotalDue has to exist, as it gives me autocomplete!

    please, anyone care to assist this one? (as he looks for his L plates)
    Last edited by stingrae; Jan 20th, 2003 at 06:11 AM.
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

  2. #2
    Frenzied Member
    Join Date
    May 2002
    Posts
    1,602
    Where have you declared the object on which the addtotal function is a member? Perhaps it is just am matter of encapsulated objects, meaning that you don't have access to that function from where you are trying to call it. How have you declared the object btw? As static or dim or private or whatever?

    kind regards
    Henrik

  3. #3
    Fanatic Member Redth's Avatar
    Join Date
    May 2001
    Location
    Ontario, Canada
    Posts
    551
    most likely though, you should be using .Text, not .value

    txtTotalDue.Text

    not

    txtTotalDue.value

  4. #4

    Thread Starter
    Hyperactive Member stingrae's Avatar
    Join Date
    Apr 2002
    Location
    Sydney
    Posts
    401
    guys, thanks for the help.

    1. No I haven't declared the objects. How do i do this?
    2. There is no member .Text, only .Value.


    thanks
    "The passion lives to keep your faith, though all are different, all are great" ... Michael Hutchence 1960-1997.

    Windows & Web Developer
    Specialising in Visual Basic .Net & Client Server Programming & Client/Customer Relations Databases
    Sutherland Shire, Sydney Australia
    www.stingrae.com.au
    Developer of Arnold - Gym & Martial Arts Database Management System
    www.gymdatabase.com.au

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