We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now

x

Remove New/Blank Record on Continuous Form

slamhound
slamhound asked
on
Medium Priority
315 Views
Last Modified: 2008-01-09
I have a form with a few unbound fields and no data source. On this form I have a "Continuous Forms" subform that shows a list of records.

How do I turn off the new/blank record on this subform?

(I've tried Me.AllowAddtions=False on Load, Open and Current of both forms but with no success)
Comment
Watch Question

CERTIFIED EXPERT

Commented:
This works for me:
Private Sub Form_Load()
Me.AllowAdditions = False
End Sub
CERTIFIED EXPERT
Commented:
Sorry, hit the wrong key.
In the sub form, this should work:
Private Sub Form_Load()
     Me.AllowAdditions = False
End Sub

Try putting in a debug.print or a msgbox statement to make sure that the routine is being executed.

You could also set AllowAdditions to 'No' in the Data tab of the subform's property sheet.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts

Author

Commented:
Is that on the form or the subform?
CERTIFIED EXPERT

Commented:
I agree; setting allowadditions to false should disable the New button and remove the new record template.

Author

Commented:
You're right! Went through the code to remove my old junk before trying your sample and found an allowadditions referencing the subform from the main form. It didn't have the "Me." so I had missed it.

Thanks!
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.