By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,593 Members | 2,006 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,593 IT Pros & Developers. It's quick & easy.

result of a sql query to variable

100+
P: 103
i have a code


code:vb 6.0

rs.Open "Select whours From empdetail Where name = '" & ListView1.SelectedItem & "' ", conn, adOpenStatic, adLockOptimistic


* txtoh.Text = Val(txthrs.Text - 8)
txtotamt.Text = Val(Form2.txtoh * Form2.txtotrt)

howw to assign the query and send to the * marked statement into the variable as "txthrs" for calculation
Dec 17 '07 #1
Share this Question
Share on Google+
3 Replies


debasisdas
Expert 5K+
P: 8,127
You need to try like this

Expand|Select|Wrap|Line Numbers
  1. txthrs.text=rs(0)
  2. * txtoh.Text = Val(txthrs.Text - 8)
  3. txtotamt.Text = Val(Form2.txtoh * Form2.txtotrt)
  4.  
Dec 17 '07 #2

100+
P: 103
Thanks It Worked!!!!!!!!!!!!!!!!!!1
Dec 18 '07 #3

debasisdas
Expert 5K+
P: 8,127
Thanks It Worked!!!!!!!!!!!!!!!!!!1
I am really happy that I could help you solve your problem.
Dec 18 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.