Form view blank when "Allow Additions" = "No"

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In a form's properties I change "Allow Additions" to No so that users could
not use this form to add records. Once I do that and then click the view
icon, the form is blank -- nothing but a big grey box. Once I hit the Design
icon, the form is still there, I just can't see it in the View state (what
the user would see).

Why?
 
In a form's properties I change "Allow Additions" to No so that users could
not use this form to add records. Once I do that and then click the view
icon, the form is blank -- nothing but a big grey box. Once I hit the Design
icon, the form is still there, I just can't see it in the View state (what
the user would see).

Why?

Presumably because the form is based on a Query which returns no
records, and it's also not updateable. It might be that the Allow
Edits property of the form is set to No, or the Query itself might not
be updateable.

If the Form returns no records, and doesn't allow new records, you'll
just get a white box; there's nothing to show (neither an existing
record nor the new record).

John W. Vinson[MVP]
 
Yep, that was it. So simple! Thank you. I assumed that if there were no
records, I'd get the form, but with all the fields blank. Now, I know that's
not the case. Thanks!
 
If you add something like the following you can still keep the
AllowAdditions false unless it comes back empty:

Private Sub Form_Open(Cancel As Integer)

If (Me.Recordset.RecordCount = 0) Then
Me.AllowAdditions = True
End If

End Sub
 
Back
Top