Blank Screen Instead of Tab Control

  • Thread starter Thread starter Chaplain Doug
  • Start date Start date
C

Chaplain Doug

Access 2002. I have a form that has a tab control with
three pages. The main form has a data source that when
empty causes the form to display as a blank screen,
without the tab control or any other controls. Why so?
How can I fix this so that when there is no data, the form
still displays with all the layout, tab controls, etc.?
Thanks.
 
The entire detail section of the form goes blank if both these factors are
true:
a) the form has no records, and
b) no new records can be added.

Sometimes (b) happens because the form's recordsource is a read-only query.
Other times it happens because you set the form's AllowAdditions property to
No. If you did that, set the property back to Yes, and the blank form will
appear at a new record. Now cancel the form's BeforeInsert event to stop the
user adding records:

Private Sub Form_BeforeInsert(Cancel As Integer)
Cancel = True
MsgBox "New records not permitted."
End Sub

If the source of the form is a read-only query, you must accept the blank
form, or change your query.
 
Back
Top