De-activate Tabbing?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi..thanks in advance!

Is there any way that I can prevent a TAB keyboard click from taking the
user to the next record.
E.g. from a text box, if I tab it takes me to the same text box in the next
record
I would like to make the tab key completely inactive in some text boxes.

Thanks.
 
Use the KeyDown event of the TextBox to check if the key pressed is TAB then
do nothing

Private Sub FieldName_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 9 Then
KeyCode = 0
End If
End Sub
 
hello Ofer, thank you for your response..

I checked and the "Key down event" is blank.
Where do I write the code that you supplied?

M
 
When the cursor is in the key down event, there will a button with three dot
on the right, click it and select the code editor, and insert this code in it

If KeyCode = 9 Then
KeyCode = 0
End If
 
Open the form in design view. Go to View, Properties and on the Other tab
in the Cycle property, change it to Current Record.

You can remove a textbox from the tab order by setting its Tab Stop property
to No.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top