Solved

Microsoft Access 2007 - continuous form

Posted on 2010-09-20
6
1,034 Views
Last Modified: 2013-11-28
I have a continuous form that displays my recordset.  I want the user to be able to update one of the fields but I don't want the user to be able to add a new record from this form.  So I open the form using acEdit to allow the records to be updated but it also has the new empty row with an "*" for adding the next record.

      DoCmd.OpenForm "DAFTracking", acNormal, , strWhere, acEdit, acNormal

Is there a way to "turn off" the empty row at the end of the detail section of my continuous form?  Or make it invisible?  I tried setting "Allow Additions" form property to No but that didn't seem to change anything.  The empty row was still there.

Thank you for the help.
Helen
0
Comment
Question by:greenprg
  • 3
  • 2
6 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 500 total points
ID: 33721099
"I tried setting "Allow Additions" form property to No but that didn't seem to change anything.  The empty row was still there."

It should.

Try this instead:

Set the Form Allow Edits to Yes, Allow Additions to No, then:

DoCmd.OpenForm "DAFTracking", acNormal, , strWhere

mx
0
 
LVL 30

Expert Comment

by:hnasr
ID: 33721941
The open to edit, shows the form to show with data and allows for entry as well.
Setting the allow additions to no, stops the additions as DatabaseMX suggested.
0
 

Author Comment

by:greenprg
ID: 33722231
Wow!  It works.  I already had the Allow Edits set to Yes and Allow Additions set to No.  All I changed was the DoCmd.OpenForm without the last 2 parameters and.......very cool.  Good thing I asked.  Who know how long I would have been searching around for that one.

Thank you.
Helen
0
Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 

Author Closing Comment

by:greenprg
ID: 33722235
Thanks for the quick response.
Helen
0
 
LVL 75
ID: 33722278
You are welcome.  Actually, I think your problem was here:

DoCmd.OpenForm "DAFTracking", acNormal, , strWhere, acEdit, acNormal
                                                                                           ^^^ and  ^^^^^^^^^

You have acNormal twice, but the argument after acEdit is for WindowMode; however, the definition of acEdit is:

"acFormEdit The user can edit existing records and add new records."

So, that's why the New Record indicator was showing, because the argument in that position ... 'DataMode' ... overrides the Form settings of AllowEdit, AllowAdditions, etc.

mx
0
 

Author Comment

by:greenprg
ID: 33722287
Thanks.  Yes, I learned something new and useful....and now I can clean up some more of my code.  Learning as you go in my case means, going back and "optimizing" older code.  :-)

Helen
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

This article is a continuation or rather an extension from Cascading Combos (http://www.experts-exchange.com/A_5949.html) and builds on examples developed in detail there. It should be understandable alone, but I recommend reading the previous artic…
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

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