continuous form

G

Guest

I have a continuous form. On that form is a item which is a date. I have an
onClick event which works just great. It knows which row I clicked. When I
click on row 9, it displays the date for row 9. However, I want to create an
onMove event for that item. When I place the cursor over a row, say row 4,
it displays the date in row 1. When I place the cursor over row 6, it again
displays the date in row 1. Regardless of the row I place the cursor over,
it always displays row 1.

What a I doing wrong? This is driving me crazy....any help would be greatly
appreciated!
 
R

Rick Brandt

PeterM said:
I have a continuous form. On that form is a item which is a date. I have an
onClick event which works just great. It knows which row I clicked. When I
click on row 9, it displays the date for row 9. However, I want to create an
onMove event for that item. When I place the cursor over a row, say row 4,
it displays the date in row 1. When I place the cursor over row 6, it again
displays the date in row 1. Regardless of the row I place the cursor over,
it always displays row 1.

What a I doing wrong? This is driving me crazy....any help would be greatly
appreciated!

There is one row that has focus regardless of where your mouse is positioned and
that is the value your code will see. When you were clicking you were actually
changing which row was the currently selected row, but just hovering your mouse
over a row does not do that.
 
S

Stephen Lebans

If I understand correctly what the OP is trying to accomplish then there
is a solution to this issue here:
http://www.lebans.com/conformscurcontrol.htm
ContinuousFormsCurrentRow.zip is a class that allows you to
programmatically access the contents of a bound control, as the user
moves their Mouse, but the control does not have the focus. For Forms in
Continuous View.

Version 1.0

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
G

Guest

I do appreciate your help!

....however

when I used the solution here's what is displayed

when I place the cursor over the first row the second row data is displayed
when I place the cursor over the second row the first row data is displayed
when I place the cursor over the third row the second row data is displayed
when I place the cursor over the fourth row the third row data is displayed

I had to convert the app in the .zip file to the 2002 format and the form
using the new class is a subform....would either of these things cause the
problems?
 
S

Stephen Lebans

I have not tested the solution as a Subform so that is most likely the
issue.A quick fix it to simply add one to the RowNumber returned via the
ClsControlData.

I do remember that Access changed the SelTop property's starting value(1
to 0) for A2K and higher. Perhaps this is part of the issue.

Might as well test it now:
I just tested the sample form as Subform. It is correctly returning the
row over which the Mouse is currently hovering. The Highlighting of the
current record is off by one which must be related to the SelTop
property above. But again, the class is returning the correct value in
all version fo Access.

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.
 
S

Stephen Lebans

I just had another look at the project. The apparent offset in which row
is to be highlighted was simply due to code behind the form that tries
to reduce any impact on performance by only processing MouseMove events
where there is a change in row position. If you remove this "governor"
the proper row is highlighted at all times.

Again though, the clsControlData itself has always returned the proper
row/data on all Access platforms.

Can you send me your MDB that exibits the behaviour you describe?

--

HTH
Stephen Lebans
http://www.lebans.com
Access Code, Tips and Tricks
Please respond only to the newsgroups so everyone can benefit.


"Stephen Lebans"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top