View Full Version : Select whole record ('neutral' focus) in a continuous form


Atomic Shrimp
09-25-2001, 03:00 AM
I have a continuous (sub)form in which customer details are displayed, when the user selects a row, the full customer details open up into the main form for editing.

The only problem is that the focus goes to the first field in the first row, I would rather the first record was selected without the focus being anywhere in particular (like it is when the user clicks on the record selectors)

Is this possible?

Elvis
10-05-2001, 01:03 AM
Don't know if this is what you want but you could add a gash control to the form, make it invisible and pass the focus to this control.

Atomic Shrimp
10-05-2001, 01:17 AM
Thanks for the suggestion, but you can't set the focus to a control that isn't visible.

[This message has been edited by Mike Gurman (edited 10-05-2001).]

R. Hicks
10-05-2001, 04:46 AM
Mike I have place a txtbox on a form then set the Tab Index to 0 to make it first in order. I then grab the sizing handles of the txtbox and reduce the size of this control to a point where you can not see the cursor when it has focus. This is kind of a "cheezy" way of doing it, but it should work.

RDH

Atomic Shrimp
10-05-2001, 05:33 AM
Cheesy it is, yes, and it kind of works, but it doesn't select the entire record in quite the way I would like, but it's the best suggestion yet, so I may have to stick with it.

Thanks for your help