Solved

Microsoft Access 2007 - continuous form

Posted on 2010-09-20
6
1,032 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
Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

 

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

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

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

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
I originally created this report in Crystal Reports 2008 where there is an option to underlay sections. I initially came across the problem in Access Reports where I was unable to run my border lines down through the entire page as I was using the P…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

932 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

11 Experts available now in Live!

Get 1:1 Help Now