Link to home
Start Free TrialLog in
Avatar of ewayce
ewayce

asked on

Opening up forms in edit or Add mode

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?
Avatar of wobblynut
wobblynut

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.
Avatar of ewayce

ASKER

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?
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) ????
 
Avatar of ewayce

ASKER

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.
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 ...
DataEntry=No
AllowEdits, AllowAddition=Yes
Filter=[blank]
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.



Avatar of ewayce

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of wobblynut
wobblynut

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ewayce

ASKER

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