|
-
Jan 20th, 2003, 06:00 AM
#1
Thread Starter
Hyperactive Member
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
-
Jan 20th, 2003, 01:49 PM
#2
Frenzied Member
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
-
Jan 20th, 2003, 02:29 PM
#3
Fanatic Member
most likely though, you should be using .Text, not .value 
txtTotalDue.Text
not
txtTotalDue.value
-
Jan 20th, 2003, 04:11 PM
#4
Thread Starter
Hyperactive Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|