Microsoft Access Forums

Go Back   Microsoft Access Forums > Access Forums > Forms

Reply
 
LinkBack Thread Tools Display Modes
  #1  
Old 02-08-2010, 02:51 PM
nitinrao nitinrao is offline Windows 7 Access 2007 (version 12.0)
Novice
 
Join Date: Jan 2010
Posts: 8
nitinrao is on a distinguished road
Question Submit Button:How can I assign a button to go to the next record and its first field?

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!
Reply With Quote
  #2  
Old 02-08-2010, 03:19 PM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

The Command Button wizard know how to make a button that goes to the next record. Have you tried it?
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
  #3  
Old 02-08-2010, 06:01 PM
nitinrao nitinrao is offline Windows 7 Access 2007 (version 12.0)
Novice
 
Join Date: Jan 2010
Posts: 8
nitinrao is on a distinguished road
Default

Quote:
Originally Posted by RuralGuy View Post
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)
Attached Images
File Type: jpg form.jpg (140.6 KB, 5 views)
Reply With Quote
  #4  
Old 02-08-2010, 06:16 PM
MAF4Fam6's Avatar
MAF4Fam6 MAF4Fam6 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Dec 2009
Location: Fruit Heights, Utah USA
Posts: 140
Blog Entries: 2
MAF4Fam6 is on a distinguished road
Default

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
Reply With Quote
  #5  
Old 02-08-2010, 06:24 PM
nitinrao nitinrao is offline Windows 7 Access 2007 (version 12.0)
Novice
 
Join Date: Jan 2010
Posts: 8
nitinrao is on a distinguished road
Default

Quote:
Originally Posted by MAF4Fam6 View Post
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.
Reply With Quote
  #6  
Old 02-08-2010, 06:52 PM
MAF4Fam6's Avatar
MAF4Fam6 MAF4Fam6 is offline Windows XP Access 2007 (version 12.0)
Advanced Beginner
 
Join Date: Dec 2009
Location: Fruit Heights, Utah USA
Posts: 140
Blog Entries: 2
MAF4Fam6 is on a distinguished road
Default

Quote:
Originally Posted by nitinrao View Post
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
Reply With Quote
  #7  
Old 02-09-2010, 04:53 AM
RuralGuy's Avatar
RuralGuy RuralGuy is online now Windows 7 Access 2007 (version 12.0)
Administrator
 
Join Date: Mar 2007
Location: 8300' in the Colorado Rocky Mountains
Posts: 4,263
RuralGuy will become famous soon enoughRuralGuy will become famous soon enough
Default

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.
__________________
(RG for short) aka Allan Bunch MS Access MVP - WinXP Pro, Win7 - acXP, ac07
If your issue is resolved...follow this link for directions on how to use the Solved thread tool!
Teaching is not filling a bucket but lighting a fire. Borrowed quote..."Docendo discimus"
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Access Questions for a Newbie - Duplicates using the Next Record button adamcm Access 11 01-21-2010 08:01 AM
Creating a Switchboard button - search for record and open up specific form / report diane802 Access 3 01-14-2010 05:32 AM
Command button help - delete record Zukster Forms 0 08-27-2009 06:47 AM
make Add Record button work janjan_376 Forms 3 06-05-2009 02:22 AM
Find Record button error Zedlexx Forms 0 03-11-2009 07:26 AM


All times are GMT -8. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.