Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Selecting a table record in datasheet view

Status
Not open for further replies.

mikelt

Programmer
Jul 4, 2000
14
GB
Does anybody know of how a record can be selected from a datasheet view of a table using keystrokes. The only way in which an operator can select a specific record is by clicking on the record selector using the mouse.

Any suggestions would be appreciated.
 
Shift+Spacebar selects a row
Ctrl+Spacebar selects a column Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Dear Jim

Many thanks for your assistance which works if the Keyboard Option 'Behaviour Entering a Field' is set to Select Entire Field.

Do you know of any way of changing this setting for different forms or even text boxes within a single form?

Many thanks in anticipation.

 
You could use the following code when you open and close a form (remember to set it back on close, if you want to keep it the same as you had before you opened it):

----------
Private Sub Form_Open()
Application.SetOption "Behavior Entering Field", 1
End Sub
----------

----------
Private Sub Form_Close()
Application.SetOption "Behavior Entering Field", 0
End Sub
----------

The value at the end of the SetOption line is either 0, 1 or 2.

0 = Select Entire Field
1 = Go To Start Of Field
2 = Go To End Of Field

Hope this helps.
Jim Lunde
compugeeks@hotmail.com
Custom Application Development
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top