Solved

INTERACT WITH ADOrecordsets

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
countAbc challenge 9 59
word0 challenge 3 78
wordlen challenge 3 61
Eclipse Neon start with Admin account only 6 94
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This is about my first experience with programming Arduino.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

920 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

14 Experts available now in Live!

Get 1:1 Help Now