|
-
Oct 11th, 2000, 03:23 PM
#1
Thread Starter
Junior Member
I have a datagrid with 3 columns. The program loops through and subtracts the value in column 3 from column 2 and puts the answer in column 1 until it reaches the end of the file.
The problem is, it doesnt actually put the answer in column 1, or at least it is not visible. How do I get Vb to show the result of the caluculation in the columm?
thanks in advance.
If you reach total enlightenment while drinking a beer, I bet it makes beer shoot out your nose.
VB5 Enterprise SP3
-
Oct 11th, 2000, 04:40 PM
#2
Thread Starter
Junior Member
here maybe the code will help you understand my problem
Code:
DBGrid1.Columns(2) = DBGrid1.Columns(5) - DBGrid1.Columns(3)
records.MoveNext
I just want the answer to actually be visible in columns(2)
can someone help me please?
thanks
If you reach total enlightenment while drinking a beer, I bet it makes beer shoot out your nose.
VB5 Enterprise SP3
-
Oct 12th, 2000, 04:17 PM
#3
Thread Starter
Junior Member
all these smart individuals.....
can anyone please hlep with this problem?
If you reach total enlightenment while drinking a beer, I bet it makes beer shoot out your nose.
VB5 Enterprise SP3
-
Oct 13th, 2000, 01:47 AM
#4
Lively Member
I did this where col 3 = col 1 + col 2
while numbers are being entered
Code:
Private Sub DBGrid1_AfterColEdit(ByVal ColIndex As Integer)
Dim s!
With DBGrid1
.Col = 0
s = Val(.Text)
.Col = 1
s = s + Val(.Text)
.Col = 2
.Text = Str$(s)
Select Case ColIndex
Case 0: .Col = 1
Case 1: .Col = 0
End Select
End With
End Sub
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
|