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?
ewayceAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wobblynutCommented:
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.
0
ewayceAuthor Commented:
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?
0
wobblynutCommented:
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) ????
 
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

ewayceAuthor Commented:
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.
0
wobblynutCommented:
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.



0
ewayceAuthor Commented:
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?
0
wobblynutCommented:
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).
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
ewayceAuthor Commented:
Ok, that about raps it up thanks for the assist.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.