By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,269 Members | 1,519 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,269 IT Pros & Developers. It's quick & easy.

Continuous Forms with MouseMove to give Popup Modal Form

P: 3
Hi guys.

I am struggling with this and I need it to complete a fairly cool facility for the users.

I have a continuous form which is populated by a recordset generated by a "common" routine which gets its data from SQL Server.

As there is not much space on a continuous form, I want the User to roll the mouse over the displayed records and as it moves over each on to popup a modal form with more detailed info. Then they can click a view button on each line to open the record in an "Edit" form.

It all works just fine with one major problem. The popup always shows the first (or last touched) record. I cannot find any way to select the actual record which the mouse is positioned over. If I click the "Update" button then it knows the record number within the recordset and brings up the correct record in the "Edit" form. How do I access the same information (record number/record detail) from the MouseMove event?

All responses will be highly valued. :-)

Roy Turner
Jul 14 '07 #1
Share this Question
Share on Google+
6 Replies


missinglinq
Expert 2.5K+
P: 3,532
MouseMove isn't really the way to go in this situation, for just the reason you've stated! Instead, use the DblClick event for the first control on your record, or for more flexibility, on the first several controls on your record.

Welcome to TheScripts, Roy!

Linq ;0)>
Jul 14 '07 #2

P: 3
Hi

Thank you for your comment.

But the object of the exercise is to avoid the need to click. When trying to spot the required record from a number of potential ones, would require lots of double clicking. If the MouseMove approach can be made to work it will be a much slicker process for the User.

Currently, as the cursor moves over each record, the modal form appears and then disappears again as they move off the record over the background of the form.

Do you know what is the difference in the way access handles a Click on a record compared with a MouseMove. How does it get access to the record number/detail when it is clicked? Is it possible to simulate the click process? I tried calling the Click procedure from the MouseMove procedure but it did not re-evaluate the record number, so the accessing of the record number must be taking place in the background.

I have seen a blog that shows how to change the colour of the record using MouseMove. I wondered if that feature can be used to invoke the record number access.

n
MouseMove isn't really the way to go in this situation, for just the reason you've stated! Instead, use the DblClick event for the first control on your record, or for more flexibility, on the first several controls on your record.

Welcome to TheScripts, Roy!

Linq ;0)>
Jul 15 '07 #3

puppydogbuddy
Expert 100+
P: 1,923
Maybe the link below will help:

Resetting changes made with the MouseMove event
http://www.computerbooksonline.com/t...ndex=1#tips764

Excerpt:
The MouseMove event can be used to tell when a user has moved his mouse pointer over a form section or control. One reason to use this event procedure is to conditionally change control attributes to get a user's attention (sample with code provided).

If you try the procedure,(that bolds a button on mouse move) you'll notice one problem--Access doesn't reset the button's font when you move your mouse pointer away from it. To reset changes made with the MouseMove event, you need to detect when your mouse is no longer over the control. Access doesn't capture such an event, so you have to attach code to the MouseMove event for whatever object surrounds the current object. (sample with code provided)
Jul 15 '07 #4

P: 3
Maybe the link below will help:

Resetting changes made with the MouseMove event
http://www.computerbooksonline.com/t...ndex=1#tips764

Excerpt:
The MouseMove event can be used to tell when a user has moved his mouse pointer over a form section or control. One reason to use this event procedure is to conditionally change control attributes to get a user's attention (sample with code provided).

If you try the procedure,(that bolds a button on mouse move) you'll notice one problem--Access doesn't reset the button's font when you move your mouse pointer away from it. To reset changes made with the MouseMove event, you need to detect when your mouse is no longer over the control. Access doesn't capture such an event, so you have to attach code to the MouseMove event for whatever object surrounds the current object. (sample with code provided)
Hi Puppydog.

Thank your reply.

My code has a Mousemove trigger on the form background which resets the boolean and closes the Popup. It pops up and down quite happily as it moves over each line on the continuous form.

What I need to know is how to get the details of the record the mouse is moving over. When I click the record, I get the record details, so Acess has the capbility. I just need in the same functionality in the MouseMove trigger.

Surely, it cannot be this hard..... can it?

Regards

Roy
Jul 16 '07 #5

puppydogbuddy
Expert 100+
P: 1,923
Hi Puppydog.

Thank your reply.

My code has a Mousemove trigger on the form background which resets the boolean and closes the Popup. It pops up and down quite happily as it moves over each line on the continuous form.

What I need to know is how to get the details of the record the mouse is moving over. When I click the record, I get the record details, so Acess has the capbility. I just need in the same functionality in the MouseMove trigger.

Surely, it cannot be this hard..... can it?

Regards

Roy
I don't think so. If your button click works, why can't you just call it during the MouseMove (or maybe the popup form's current event). if your click procedure is named btnPopup_Click(), you would call it from the MouseMove (or current) procedure like this:
btnPopup_Click 'leave off the parentheses

and it should work the same as if you physically clicked the button
If that doesn't do it, you can clone the popup's recordset and set a bookmark on the current record.
Jul 16 '07 #6

puppydogbuddy
Expert 100+
P: 1,923
Roy,
Have not heard from you regarding my last post. Did you resolve your problem? Let me know. Thanks.
Jul 18 '07 #7

Post your reply

Sign in to post your reply or Sign up for a free account.