?
Solved

Clicking a image column in the forms grid does not change the CurrentRow value

Posted on 2014-08-27
6
Medium Priority
?
186 Views
Last Modified: 2014-09-03
I want to allow the users to click on the trash can image and delete the row. The problem is  clicking the image does not change the forms "CurrentRow" value, they must first click in another column to adjust the current row then click the image. How can I have clicking the image adjust the "CurrentRow".

Forms RecordsetType is SnapShot

Grid
0
Comment
Question by:Bob Hoffman
  • 4
  • 2
6 Comments
 
LVL 85
ID: 40289030
That doesn't really look like an Access datasheet listing. Is that some sort of 3rd party control?
0
 
LVL 8

Author Comment

by:Bob Hoffman
ID: 40289057
no, it's access.
0
 
LVL 85
ID: 40289979
Can you provide a sample database? It's going to be difficult to help without one.
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 8

Author Comment

by:Bob Hoffman
ID: 40290511
Here you go. I think the issue is that an image can't be given focus so the currentRecord wont change. If you click the checkbox next to the image the currentRecord changes but the checkBox click event doesn't fire?

I'm not opposed to doing this differently if there's a better way, I just need the recordset type to be snapshot and have something the user clicks on to fire an event where I can verify the delete and delete the row.

Thanks
sample.zip
0
 
LVL 8

Accepted Solution

by:
Bob Hoffman earned 0 total points
ID: 40293354
Seems a control that can't receive focus will not change the forms current record when you click on it. So I needed to use a control other then an image.

Went with the following hack.... I mean work around:

changed the delete image to a textbox, made the textbox look like a checkbok. The Checkbox onClick event didn't fire when I set the recordset type to snapshot so I couldn't use a checkBox.
in the onClick event on the textbox I processed the delete, in the event that the delete was denied I showed the error and set focus to the next control in the grid (so the user couldn't type in the box)
0
 
LVL 8

Author Closing Comment

by:Bob Hoffman
ID: 40300566
Solved the problem myself.
0

Featured Post

Independent Software Vendors: 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

Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Microsoft Access has a limit of 255 columns in a single table; SQL Server allows tables with over 255 columns, but reading that data is not necessarily simple.  The final solution for this task involved creating a custom text parser and then reading…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

850 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