I'm trying to set up a "Submit Button" which will allow you to go to the next record and the first field of the record upon clicking or pressing enter on it (in a form).
How can set up this command?
Thanks in advance!
I'm trying to set up a "Submit Button" which will allow you to go to the next record and the first field of the record upon clicking or pressing enter on it (in a form).
How can set up this command?
Thanks in advance!
The Command Button wizard know how to make a button that goes to the next record. Have you tried it?
I tried to use the command button wizard, but it only allows me to go to a new record - but not the new field. If I were to do this using set focus, how would my code look like? I want to set the focus on the field called "Last Name" (please see my attached pic of the form)
Have you tried customizing your fields' Tab order on your form?
Go to your form's Property Sheet > Other Tab > Tab Index and try changing the Custom Order of your fields.
-RC
I have, but I have subforms in my tab index...so tab won't help me get to the new field of the new record.
But please let me know how I should insert the setfocus code.
I'm sorry. I'm not the expert at VBA. I wish I new the code to better assist you. I'm more of an expert in Macros. Let me know if you are interested going this route (Macro) if you still can't find a solution through code.
Thanks.
-RC
Setting the focus is easy but that picture you posted liiks like a main form and the TabIndex would accomplish what you want as MAF4Fam6 suggested. If you don't want to use the TabIndex then post the code the wizard created for your Submit button and we'll add a SetFocus line for you.