Solved

Problem when scrolling a Datagrid with arrow keys

Posted on 2000-05-09
3
208 Views
Last Modified: 2013-12-26
I have a Datagrid populated from a ADO Data Control. My datagrid can show about 5 records from the recordset. When the user selects a record from the datagrid I fill text boxes with additional data from the chosen record. When ever you scroll (arrow) to the next record in the Datagrid the text boxes are updated with that records info. If I use the scroll bar and expose a row down the list and then mouse onto the row it works OK. I use RowColChange and/or SelChange to fire the query for the text boxes.
This works great until you try and scroll up or down to the next record when it is not showing in the datagrid. The events do not appear to fire when arrowing to the next record when not shown.
I have the same problem with an MSFlexgrid with out a Data Control.
Help.
0
Comment
Question by:semcoray
  • 2
3 Comments
 
LVL 43

Accepted Solution

by:
TimCottee earned 50 total points
Comment Utility
You might be better off firing the additional query to fill the text boxes from the ADODC1_MoveComplete event rather than the rowcolchange, this should fire whenever the record is moved in the underlying recordset and doesn't require that the datagrid has retrieved the row yet.
0
 

Author Comment

by:semcoray
Comment Utility
I had tried the MoveComplete event unsuccessfully and your last sentence explains why. I am referencing a datagrid column in my query to fetch the PK field to populate the rest of my text boxes. I should be referencing the Data Controls current record instead.

I do not know how to do that!
0
 

Author Comment

by:semcoray
Comment Utility
I have refernced the Data Control and it works as advertised.
varPKNumber = adodc1.Recordset!PKNumber

Tim thanks for the help.
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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

771 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

11 Experts available now in Live!

Get 1:1 Help Now