Solved

INTERACT WITH ADOrecordsets

Posted on 2004-08-27
4
213 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

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

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

This is an explanation of a simple data model to help parse a JSON feed
In this post we will learn different types of Android Layout and some basics of an Android App.
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

733 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