Solved

INTERACT WITH ADOrecordsets

Posted on 2004-08-27
4
215 Views
Last Modified: 2010-04-17
I'am new to VB,  so I'am looking for following solution.

I have 1 mainform, on form 10 textfields, 1 ADOrecordset bound to Grid,
8 textfields bound to Gridrecordset, while scrolling in Grid textfields are
perfectly updated on screen, but,  2 fields need to be 'handled' before
they can be displayed on screen.  I do now a getfocus on these fields
in these subs getfocus I do 'handling' and display text, is ok.
But if I only scroll in Grid and boxes are not clicked so also not
a gotfocus occurs, user sees only the 8 bounded textboxes and not the
2 'to handle'  boxes updated with recordinfo.
What do I need to do to get a active some-sub, so while scrolling in Grid
I can 'handle' these 2 boxes, display info, and get next or prev line in Grid
and repeat and so on.
Regards  Jack


0
Comment
Question by:BIAPRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 5

Expert Comment

by:rsriprac
ID: 11919345
Try using the mouse action handles  as the updater, so then when a mouse action occurs, the field are properly updated.

-RAm
0
 
LVL 19

Expert Comment

by:arif_eqbal
ID: 11920009
What Language VB6 or VB.NET??

It seems you are using VB.NET
if yes try this....

On the Paint Event of your Grid check if the column being shown is the column you want and then process it...

Private Sub DataGrid1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles DataGrid1.Paint
       
If DataGrid1.CurrentCell.ColumnNumber = 2 Then 'Or wahtever Column you want
            'Process the Column values here
 End If
End Sub

0
 

Author Comment

by:BIAPRO
ID: 11930552
no, I am on VB 6.0
so this one is not possible innVB6
0
 
LVL 5

Accepted Solution

by:
prashantagarw10 earned 500 total points
ID: 11936623
u may try using change event of any of the textboxes which are bound to recordset. Also prefer to use change event of that box whose value is manipulted to display in the new textbox.
e.g. if ur bound textbox is txtBasic and unbound is txtTotal whose calculation is txtTotal=txtBasic+txtAllowances and txtBasic and txtAllowances are bounded then make a new sub to change value in txtTotal and call it on change event of both(txtBasic and txtAllowances).

Hope u got that!!

good luck!!!
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Part One of the two-part Q&A series with MalwareTech.
Simple Linear Regression
Introduction to Processes

632 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question