473,396 Members | 1,971 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes and contribute your articles to a community of 473,396 developers and data experts.

How to open Access 2010 Navigation Form in acAddMode

The Access 2010 Navigation form has very little documentation. One issue is moving to a different Tab (subform) in data AddMode.
The assumed method is
Expand|Select|Wrap|Line Numbers
  1. DoCmd.BrowseTo acBrowseToForm,[Form Name],[Path To Subform],,,,acFormAdd
Unfortunately the target form will still open in EditMode

One workaround is to declare a public variable the suborm can use during the On_Load event.

First: create a new module 'modForms'

add the following Type and Enum

Expand|Select|Wrap|Line Numbers
  1. Public Enum FormDataMode
  2.    EditMode = 1
  3.    AddMode = 2
  4. End Enum
  5.  
  6. Public Type Q_Forms
  7.    frmMode As FormDataMode
  8. End Type
  9.  
  10. Public QForms As Q_Forms
Add a Private procedure to the Navigation subform calling the subform to be opened in AddMode:

Expand|Select|Wrap|Line Numbers
  1. Private Sub OpenSubForm(DataMode As FormDataMode)
  2.    On Error GoTo ErrorHandler
  3.  
  4.    QForms.frmMode = DataMode
  5.  
  6.    DoCmd.BrowseTo acBrowseToForm, "[MySubForm]"
  7.  
  8. End Sub
Add a command button, DoubleClick event etc. to the NavigationForm calling subform and pass the DataMode as the variable:
Expand|Select|Wrap|Line Numbers
  1.  
  2. OpenMySubform AddMode
On the On_Load of the called subform add:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Form_Load()
  2.    Select Case QForms.frmMode
  3.       Case AddMode
  4.          Me.DataEntry = True
  5.       Case EditMode
  6.          Me.DataEntry = False
  7.       End Select
  8. End Sub
And there you have it.
Jan 23 '15 #1
1 11321
twinnyfo
3,653 Expert Mod 2GB
Kurt,

Thanks for your advice. I've seen quite a few posts about some of the problems with Access Navigation Forms. Hopefully, this post will guide some other users to success.
Feb 25 '15 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

6
by: VivDenham | last post by:
I have a Form, the fields of which I also use to copy and paste into a Report. However, each time I make design changes to the Form, I have to remember to copy and past the changes into the Report....
0
by: araman | last post by:
Hello, I have a form and subform . The Main form contains four boxes to enter criteria for the query that fills the subform. Outside of the navigation form it works great. when i add it to the...
5
by: neelsfer | last post by:
I got a new work laptop last week with Access 2010 pre-loaded.I also installed the new Office 2010 service pack 1. I then loaded 2 of my regularly used Access 2007 + service pack 2 applications on...
4
by: jbrumbau | last post by:
Hello, In Access 2010/2007, how do you prevent users from flipping into design view from the ribbon? I do not want to hide the entire ribbon (DoCmd.ShowToolbar "Ribbon", acToolbarNo) or even the...
4
beacon
by: beacon | last post by:
Hi everybody, My title may not exactly describe my issue, so please forgive my lack of creativity today. I've got a database that was created in Access 2003 that I've opened in Access 2010. I...
6
by: mlgmlg | last post by:
Hello, I desperately need help to modify a where condition that was created when I added a button to open a form and find specific data by to display. The form currently opens and displays a...
5
Seth Schrock
by: Seth Schrock | last post by:
I have created a navigation form in Access 2010 using the horizontal tabs, 2 levels style. This form is my startup form. In the top row, I have to options. Under each option are several sub-tabs...
1
by: BuildIT | last post by:
Hi All, I designed an Access DB which enables to record communications between users. It sends e-mails and users are responding to these e-mails by login in an mde file. What would be a...
7
hyperpau
by: hyperpau | last post by:
Hi All, It's nice to be back. I just got my hands on Access again and I was surprised that the magic is still there. However, the new Navigation Forms in 2010, replacing the switchboard, is...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.