Opening up forms in edit or Add mode

Posted on 2003-03-01
Medium Priority
Last Modified: 2011-10-03
I'm using Access 2002.

Part1  All my formes are opened in edit mode in order to be able to do a search, I noted if you open for add (makes sense)you cannot do a search.

However, I have one form that acts as though it was opened for add no matter what I do because when I click on the search button, created with a wizard, I get: You can't use find or replace now.

Part 2 How or can better control whether or not a form comes up with empty fields. I'm really confused some of the forms come up filled in some don't, and they are all opened in edit from my switchboard?
Question by:ewayce
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4

Expert Comment

ID: 8049312
Part 1.  Check the properties of the form.  The DataEntry property should be "No".  

Part 2.  Check the default values in the underlying table and in the control properties.

Author Comment

ID: 8049954
Ok, you hit the nail right on the head for number 1, how it got that way is a mystery.

Number 2. Let's see if I understand you. The form is called customer, it has a table with the same name. I checked each field's properties in the table and all the defaults were blank.

Then I went to the form and checked each control/field's properties for a default value, again they were all blank. Is that what you mean?

Expert Comment

ID: 8056028
Do I understand you to mean that ...
(i) some of the fields in New Records have data already in them, or
(ii) do you mean that some forms open with no blank line for adding new records, or
(iii) something else ?

(i) attempted to answer previously ... if you've no code adding data, and no default values set, then not sure what to suggest.
(ii) check form properties so that AllowEdits, AllowAdditions both YES.
(iii) ????
Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.


Author Comment

ID: 8057167
When the form opens, all fields are automatically populated. For example, I open the customer record form. The form has all the fields filled in starting with the first record in the table. I can advance to the next record and then back again. I noticed that this is a symptom of opening a form under in edit mode versus add. However, some forms do not do this they open and all the fields are empty. It's so inconsistant that there was something I did wrong.

I open all forms in edit mode because it's the only way I could get search to work. I suspect Access is working as it should be. I'm just looking for a way to make Access open the form without reading a record automatically.

Expert Comment

ID: 8059362
I would check that in the switchboard table that all relevant values in Command field are 3 not 2.  (Assuming you are using Switchboard Manager).

Then check form properties ...
AllowEdits, AllowAddition=Yes
DefaultView=[what you expect it to be?]

If you are after a form that does not read data then the DataEntry should be Yes.  Then it will be irrelevant as to whether switchboard calls up edit mode or add mode.


Author Comment

ID: 8059501
All of the properties are set correctly, switchboard is ok also.

If I set DataEntry to =no, then I can no longer search. Is there a way to change the property to yes upon clicking on the search button?

Accepted Solution

wobblynut earned 300 total points
ID: 8064234
Sounds like you need to open the form in edit mode (i.e loading all records), them automatically move to new record.

Add the following to forms OnLoad event

DoCmd.GoToRecord , ,acNewRec

If defaultview is set to singleform then only that record will be visible (untill scrolled - however you can always disable this if you want).

Author Comment

ID: 8067654
Ok, that about raps it up thanks for the assist.

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
If you need a simple but flexible process for maintaining an audit trail of who created, edited, or deleted data from a table, or multiple tables, and you can do all of your work from within a form, this simple Audit Log will work for you.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
Suggested Courses

770 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