|
-
Sep 25th, 2000, 10:27 AM
#1
Thread Starter
New Member
Does anyone know how to calculate the value of cells in a database field. I'm new to vb and i'm trying to multiply one cell times another cell in my program and i cant figure it out. Also i was wondering if you don't have acess can you use another database to link to your vb project. And if so how? Thanks
Here's some source code of what I've been trying to do
Example1
Private Sub DataGrid1_Click()
Set rsta = Adodc1.Recordset
rsta.Fields(0).Value X rsta.Fields(1).Value = rsta.Fields(2).Value
End Sub
Example2
Private Sub DataGrid1_Click()
Set rsta = Adodc1.Recordset
rsta![field name2] * [field name2] = [field name3]
End Sub
[Edited by Squid13_2000 on 09-25-2000 at 02:50 PM]
-
Sep 25th, 2000, 11:45 AM
#2
Lively Member
Show us some code sample. Source code helps a lot when trying to figure out problems.
Sincerely yours,
Patrice B. 
Information System Analyst
SAS 9.1.3, VB6 SP6, VB.Net 2003, SQL7.0/2000
-
Sep 26th, 2000, 05:50 AM
#3
IF you want the result in field3 then try
something like this: :
[field name3] = [field name2] * [field name2]
-
Sep 26th, 2000, 11:57 AM
#4
Lively Member
Sincerely yours,
Patrice B. 
Information System Analyst
SAS 9.1.3, VB6 SP6, VB.Net 2003, SQL7.0/2000
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
|