Solved

INTERACT WITH ADOrecordsets

Posted on 2004-08-27
4
209 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
4 Comments
 
LVL 5

Expert Comment

by:rsriprac
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
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 …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

763 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now