?
Solved

Microsoft Access 2007 - continuous form

Posted on 2010-09-20
6
Medium Priority
?
1,041 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 2000 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
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 

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

Back Up Your Microsoft Windows Server®

Back up 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.

Question has a verified solution.

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

In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Code that checks the QuickBooks schema table for non-updateable fields and then disables those controls on a form so users don't try to update them.
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

764 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