Select a Record on a Search Form

MarvinM

Registered User.
Local time
Today, 08:14
Joined
Nov 26, 2013
Messages
64
[SOLVED] Select a Record on a Search Form

Hello again, Experts,

Attached is a snippet from my search form.
I have a search on Last Name, and in this example, I use Last Name beginning with "m". That pulls up two matching, filtered results, Mickey and Mimi.

All the controls in the detail section are disabled because I don't want the users to make any edits here. I want them to click on a row and that will take the Record Number from that row and open up a Detail form. This is where they will make their edits.

I've set the On Click property for the Detail section to run a procedure. The event procedure works fine if the user clicks on the selected row. Notice the record selector in the picture is pointing to Mimi. If the user clicks on Mimi, everything works fine. If the user wants to open Mickey's record, they have to move the record selector first and then click on Mickey (2 clicks). If they don't move the record selector first, nothing happens.

Is there a way to change the selected record when the user clicks anywhere in the row? Again, all the controls in the row are disabled, so this doesn't happen automatically like it normally would. I considered putting a command in the On Click property, but that event procedure seems to only run if the user clicks on the selected row. I just need the selected row to change if the user clicks on a row other than the currently selected row. How do I do that?

Thanks!
 

Attachments

  • Search.png
    Search.png
    9.6 KB · Views: 136
Last edited:
I just need the selected row to change if the user clicks on a row other than the currently selected row.
Suppose there were 5 rows, where do you want the record selector to go??
 
You could Lock a Field and Enable it.

Simon
 
Suppose there were 5 rows, where do you want the record selector to go??

I want the record selector to go to the row that the user clicks on. Say the user searches for "Smith" and 5 filtered results show up. They can look at the 5 rows and decide, "I want to see John Smith's record." If they click on that row, it could be row #3, I want that record to be selected.

Thanks!
 
Simon,

You are a genius! I tried enabling the Record Number and found that the user could click anywhere on the row and the selection would change to that row. However, when clicking on that enabled control, the On Click procedure wouldn't fire. I can get around that very easily by just picking a small control at the right end of the row to enable.

Thank you!
Marvin M
 
You need to replicate on the On click Event on the enabled field.

Simon
 
Not necessary. I made the enabled field 0.001" x 0.001" and put it on the far right edge of the form. With Transparent border & background, they'll never find it. If they do, they'll just think that their mouse missed the form and click again.
 

Users who are viewing this thread

Back
Top Bottom