Solved

Problem when scrolling a Datagrid with arrow keys

Posted on 2000-05-09
3
213 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
ID: 2792636
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
ID: 2792933
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
ID: 2793033
I have refernced the Data Control and it works as advertised.
varPKNumber = adodc1.Recordset!PKNumber

Tim thanks for the help.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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.
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

713 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