Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Opening up forms in edit or Add mode

Posted on 2003-03-01
8
Medium Priority
?
465 Views
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?
0
Comment
Question by:ewayce
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:wobblynut
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.
0
 

Author Comment

by:ewayce
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?
0
 
LVL 2

Expert Comment

by:wobblynut
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) ????
 
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

Author Comment

by:ewayce
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.
0
 
LVL 2

Expert Comment

by:wobblynut
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 ...
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
 

Author Comment

by:ewayce
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?
0
 
LVL 2

Accepted Solution

by:
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).
0
 

Author Comment

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

Featured Post

[Webinar] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

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

I have had my own IT business for a very long time. I started mostly with hardware and after about a year started to notice a common theme. I had shelves with software boxes -- Peachtree, Quicken, Sage, Ouickbooks -- and yet most of my clients were…
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Enter Foreign and Special Characters Enter characters you can't find on a keyboard using its ASCII code ... and learn how to make a handy reference for yourself using Excel ~ Use these codes in any Windows application! ... whether it is a Micr…
Suggested Courses

580 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