Skip to main content
gamedev.net
🔒 Locked

Visual Basic 6 with Database

Started by majc May 23, 2006 at 9:04 PM 0 replies 500+ views
Original Post
majc
majc
Im trying to read some values of some fields, make a multiplication and then add the result to a database. I tryed to do this: Private Sub cmdCalc_Click() Dim op1 As Single Dim op2 As Single op1 = Val(txtQuant.Txt) op2 = Val(txtUni.Txt) txtTotLiq = Op1 * Op2 End Sub But the problem is that when i try to write txtQuant. apears Count, Item, LBound and Ubound, dont apears .Txt Why??
technomancer
technomancer
my guess is that the txtQuant is a control array
i.e. you have an index property for multiple controls called txtQuant. You need to find out what control index you want to write to is from the control properties , then reference it like this

txtQuant(1).text = value.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.