MS Access form - cursor doesn't start in first tab

Caporegime
Joined
13 May 2003
Posts
34,559
Location
Warwickshire
Hi all

I'm developing a database at work. There's a data entry form and one minor gripe that's arisen during the testing phase is that when you create a new record, the cursor doesn't default to the first tabbed field, you have to move the mouse to the field and click inside it in order to begin typing.

Some of these guys are entering data at a hell of a lick and it may seem a small thing, but it's actually affecting their speed.

Grateful for anything you might be able to offer!
 
I think that you specify the tab order to resolve exactly this issue.

if not try recreating the form input elements in the order you want the tabbing to go.
 
Thanks for the replies. The tab orders are specified and correct in 'View, Tab orders'. They're tabbing through fine and in the correct order, it's just not putting the cursor at the first field of the record.

Have a look at this picture, relevant row at the very bottom:

96114256.jpg


This is probably relevant too:

47460544.jpg
 
Last edited:
I can't see you're whole Source, but it looks like the 'Entered By' field is a Combo Box?

You've got this Combo Box 'Limited to List' - ie only allow names already in the list.

And you've also got it to display 3 pieces of information (OperatorID, O...) if the drop-down.

However your column widths are 0cm;4cm;2cm

Do you mean to do this? If the first column has a width of 0, could that be why the cursor can't be seen?

I'm not sure I fully follow the problem - perhaps a screenshot of the Form View would help?
 
Here you go:

60120961.jpg


I'm trying to make data entry a mouseless operation, but I cannot seem to make it navigate to the first drop-down straight away.

Good idea about the column widths, but this is not the reason as subsequent tabs and the other drop downs have also hidden the ID number, but I am not having an issue with tabbing and entering those values.
 
If you tab right through all the fields and then back to the first - does it then have the cursor displayed and selected properly?
 
If you tab right through all the fields and then back to the first - does it then have the cursor displayed and selected properly?

Answer: yes.

Thanks for the effort anyway div0 and marc2003.

Looks like I have some more Googling to do, I looked briefly but couldn't find anything. Thanks for the help.

EDIT - looking at the screen above, the focus is still on the 'New Record' button. It looks like I need to somehow transfer focus to the 'OperatorID' field from the 'New Record' button, presumably using a macro as per what marc2003 says.

This is where my knowledge expires (unless there's a default macro action that can achieve this) so unless there are any VB experts on this forum, I'd better do some hunting around specialist forums.

Thanks.
 
Last edited:
hehe, i knew i'd post something stupid. :o

Hehe, certainly not stupid.

Robbie G - can you explain a bit more about how your Form works? I think it has something to do with the way you are using your 'Create New Record' button.

I think you may just need to add some VB code in there.

So in Design View - go to the Properties for the 'Create New Record' Button, then 'Build Event...'

In there you need to add the following code:

Me.[Entered By].SetFocus

I think that will do what you want.
 
The code on the 'New Record' button was:

Code:
Private Sub btnNewRecord_Click()
On Error GoTo Err_btnNewRecord_Click


    DoCmd.GoToRecord , , acNewRec

Exit_btnNewRecord_Click:
    Exit Sub

Err_btnNewRecord_Click:
    MsgBox Err.Description
    Resume Exit_btnNewRecord_Click 
    
End Sub

Changing it to...

Code:
Private Sub btnNewRecord_Click()
On Error GoTo Err_btnNewRecord_Click


    DoCmd.GoToRecord , , acNewRec
    [COLOR="Red"]Me.[Entered By].SetFocus[/COLOR]

Exit_btnNewRecord_Click:
    Exit Sub

Err_btnNewRecord_Click:
    MsgBox Err.Description
    Resume Exit_btnNewRecord_Click

    
End Sub

...seems to have solved the problem! After the user clicks new record, the new record shows up with the cursor flashing on 'Entered By' combo box.

Many thanks for your help, superb job!

I'm just beginning to understand what a vast tool Access really is. Huge potential but huge potential for knowledge gaps also.
 
Many thanks for your help, superb job!

Glad to help.

And thanks for posting your full solution, it's always helpful for other people if they search in future.

You're right that Access is a very useful tool, and yes it's easy to find gaps in your knowledge :)

Whenever I go back to old databases that I've designed, I often find that I did things in very convoluted ways, where now with a bit more experience I would do it in a totally different way. But I don't think there's much you can do to avoid that - you learn as you go.
 
Back
Top Bottom