Solved

INTERACT WITH ADOrecordsets

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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
drawing animated level bar based on numbers 3 97
White board coding practice 3 88
Auto-indent certain lines in Notepad++ 10 76
sp_configure 'external scripts enabled', 1; 7 52
Displaying an arrayList in a listView using the default adapter is rarely the best solution. To get full control of your display data, and to be able to refresh it after editing, requires the use of a custom adapter.
This article will inform Clients about common and important expectations from the freelancers (Experts) who are looking at your Gig.
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…
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…

821 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