Hello everyone
I have a Form with a Subform in it. I am trying to setup the Tab order, but every time the cursor moves to the Subform it skips a field and goes directly to the next one. Why is this happening ?
Hello everyone
I have a Form with a Subform in it. I am trying to setup the Tab order, but every time the cursor moves to the Subform it skips a field and goes directly to the next one. Why is this happening ?
You set the tab order for the subform the same way you do for the main form, you can edit the order in the design view of the subform. As long as your 'enabled' property is set to true you should hit the fields in the order you specify
I did setup the order tab in the design view for both my main and sub forms and the ‘Enabled’ property is set to true for every control item in both forms, but still when the cursor moves to the subform it skips the first field and goes right into the second one, I can’t figure why it is doing this ?
I would need to see a sample database, 'auto order' if you used it does not necessarily arrange things in the order you want them.
Hello rpeare
Thanks for your reply
https://drive.google.com/file/d/0B9y...ew?usp=sharing
This is a sample database, the form in question is called Accidents and the sub form is called AccidentDetails. When you start entering data in the form, the first round (record), the cursor moves in the correct order but starting from the second round, when the cursor enters the sub form it skips the CompID field and starts directly in the Quantity field.
Ok here's what's going on. When you use tab to get out of the subform access is 'remembering' where you were in the subform and preserving that for when you go into it again, you'll notice the first time you enter the subform it correctly goes to the first field. You can counteract it with:
DoCmd.GoToRecord , , acNewRec
DoCmd.GoToControl "compid"
in the ON ENTER property of your subform
Thank you rpeare,
You have solved my issued.
God bless you Sir.
Since Location is required in form Accidents, put this in the AfterUpdate of the Location field:
Forms![Accidents]![AccidentDetails Subform].Form![CompID].SetFocus