Solved

Button to add new record positioned at top of continuous form

Posted on 2013-06-15
2
899 Views
Last Modified: 2013-06-15
I have a continuous form that has a button whose On Click Event is
DoCmd.GoToRecord , , acNewRec
Problem is that the new record is not totally visible, only the top part of it. Is there any way of setting it up so that the new record is positioned at the top of the page or at least that the whole selected record is visible?
0
Comment
Question by:Rob4077
2 Comments
 
LVL 47

Accepted Solution

by:
Dale Fye (Access MVP) earned 500 total points
ID: 39249878
When you go to the new record, the focus will be set to the first control (in the tab order) of the record.  You can try moving the focus to the last control, and then back to the first, something like:

docmd.gotorecord ,,acnewrec
me.txtLastControlName.setfocus
me.txtFirstControlName.setfocus
0
 

Author Comment

by:Rob4077
ID: 39249922
That did the trick. Thanks.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now