Blank Form

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

Guest

I have a strange situation, and I wonder if anyone else has run into it. I
have a form with a couple of controls and a subform. I have a menu with a
button which runs a macro to open the form. This works fine. But if I open
the form in deisgn mode, and view or update the code for the form, and then
try to run the form again, it appears completely blank. None of the controls
appear. I've looked many times at the property sheet, and at the code, and I
can't figure out what is causing it. All my other forms are fine. Does this
sound familiar?
 
BevieG said:
I have a strange situation, and I wonder if anyone else has run into
it. I have a form with a couple of controls and a subform. I have a
menu with a button which runs a macro to open the form. This works
fine. But if I open the form in deisgn mode, and view or update the
code for the form, and then try to run the form again, it appears
completely blank. None of the controls appear. I've looked many
times at the property sheet, and at the code, and I can't figure out
what is causing it. All my other forms are fine. Does this sound
familiar?

The detail section a form is completely blank when both of the following are
true...

The form has no existing records to display (could be from a filter)

The form and/or its RecordSource do not allow new records.
 
The Detail section of the form goes completely blank if both:
a) there are no records to display, and
b) no new records can be added.

(a) could be caused by a filter or Where Condition, by query criteria (e.g.
if reading a value from the form itself), or by an empty table.

(b) could be caused by the form's AllowAdditions property being set to No,
or by using a read-only query as the source.
 
When I toggle between design and view, I notice that many variables are
persistent. For me, I'll get bad value in the Filter property or
Recordsource property that causes similar behavior.
 
Thanks for your quick response, but I resolved it by setting the Allow
Additions property of the form to Yes. I'm not sure why, but it makes a
difference.
 
I would assume that the RecordSource for the form does not return any
records on its own (your macro probably provides a Where string to the form
when it's opened). AllowAdditions is the property that tells the form if it
is to allow the entry of new records; setting it to No means no new records
can be added. Thus, in your situation, there were no records to be
displayed, and the form couldn't allow the addition of a new record.
Therefore, no data to display or enter, and therefore no controls are seen.
 
Back
Top