Solved

Microsoft Access 2007 - continuous form

Posted on 2010-09-20
6
1,031 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
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

It took me quite some time to sort out all the different properties of combo and list boxes available from Visual Basic at run-time. Not that the documentation is lacking: the help pages are quite thorough and well written. The problem was rather wh…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
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…
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now