473,405 Members | 2,373 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Add mode and Edit mode with Switchboard

Hello. My switchbaord contains 2 options: add a record and edit a
record. So, of course, if I click add a record, the first form opens
in add mode; if I click edit, the first form opens in edit mode. BUT,
when I click on the nav buttons I've created on the forms, the next
form will only open in the mode specified by the code for that button.
So I need to find out how I can set up the code so that, if I open the
first form in add mode, the next form will also open in add mode;
likewise, if I open the first form in edit mode, the next form will
open in edit mode.

Hope that makes sense!

Jun 8 '06 #1
1 8211

ph****@ibhs.org wrote:
Hello. My switchbaord contains 2 options: add a record and edit a
record. So, of course, if I click add a record, the first form opens
in add mode; if I click edit, the first form opens in edit mode. BUT,
when I click on the nav buttons I've created on the forms, the next
form will only open in the mode specified by the code for that button.
So I need to find out how I can set up the code so that, if I open the
first form in add mode, the next form will also open in add mode;
likewise, if I open the first form in edit mode, the next form will
open in edit mode.

Hope that makes sense!


Off the top of my head, write the value of the open mode being used to
a variable before opening the first form, then use that in all
subsequent calls...

?acformadd
0
?acformedit
1
?acformreadonly
2
?acformpropertysettings
-1

So, you'd do something like set a global variable when you open your
first form.
public gintOpenMethod as integer
gintOpenMethod = [set to one of the above values]

then afterwards,
docmd.openform "myform", gintOpenMethod

Jun 9 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: JSMiami | last post by:
The switchboard has a way of opening forms in either Add mode or in Edit mode. Is there anyway of testing for that mode in VB code? If not is there a way of testing (within a subform) if there is a...
1
by: jimwlee | last post by:
Hi all, I mistakenly deleted my switchboard on the Object Forms view. I recreated it again with the database utility, but the switchboard isn't showing up in the forms view. Any ideas? Thanks in...
0
by: tamilan71 | last post by:
Can anyone tell me a simple method of creating an application in Access 2003 that uses "Double data entry"? For me double data entry is defined as the ability to have data entered twice. The first...
6
by: Regnab | last post by:
A friend of mine was given a database a couple of years ago. With a change in her job requirement, she now would like to use it, but needs to modify it. At the moment it just opens up at the...
6
by: Tamir Khason | last post by:
How to prevent the selected cell from being editable (visual) at DataGrid? Once click on cell (even readonly) there are cursor inside it and select text appears. How to prevent it Thankx
1
by: sck10 | last post by:
Hello, I am trying to change a value when a user goes into edit mode on a DetailsView control. I am trying to use the following, but can not figure out how to get to the bound field...
4
by: wandii | last post by:
Hi, I have a datagrid attached to a dataset. It displays the records fine however, when I edit one of the cells it does not change the edit icon to the pencil icon on the left of the row I just...
1
by: Mark Stafford | last post by:
I am attempting to use a DetailsView control to view some data where the fields returned by the database are determined at runtime. I create the TemplateFields on the fly using a class that...
1
by: mikeburgesss5355 | last post by:
i wish to use a "button" on a in access switchboard to edit numerous notepad txt files..these are hql files(health query language files used in healthcare gp systems). (normally about 20 notepad...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.