Objects on form are hidden

F

Finance guy

I have an Office 2003 database with subforms. The subform displays, but
the objects do not show. It displays as one giant rectangle, but all text
boxes, etc are completely hidden.

Moreover, if I open the subform up, the result is the same. However, if I
go to design view, all objects appear.

I am unable to get the objects to display on my form.

Any assistance appreciated.
 
D

Daryl S

It sounds like no data meet the criteria to be displayed. This could be due
to the parent/child link from the main form to the subform. Is the main form
on a record that has matching subform data?
 
B

BruceM via AccessMonster.com

Does the subform control have a source object? If so, is the source object
based on a table related to the main table, and are the Link Child and Link
Master fields correctly set?
 
F

Finance guy

This happens when all transactions are deleted from the database, so your
assumption is most likely correct. Is it possible to force the subform to
show all controls regardless of is there is data that meets the criteria to
be displayed?
 
M

Marshall Barton

If there are no existing records for a subform, then the
only thing a user can do is add a new record. If you set
the subform's AllowAdditions property to Yes, then a empty
record will be displayed ready for data to be entered.

If you can not permit new records to be added, then the form
will be blank as you are seeing. About the only thing you
can do is make a main form label or something visible to
display the fact that there is nothing to display:
Me.label.Visible=(Me.subform.Form.Recordset.RecordCount=0)

If you want, you can hide the blank subform at the same
time:

Me.subform.Visible=(Me.subform.Form.Recordset.RecordCount>0)

Where you would put that code in the main form depends on
what triggers the subform to load a different set of records
(maybe the main form's Current event?)
 
B

BruceM via AccessMonster.com

Are the transactions the main form data, or the subform data? Are the Link
Child and Link Master fields for the subform control set up correctly?

Finance said:
This happens when all transactions are deleted from the database, so your
assumption is most likely correct. Is it possible to force the subform to
show all controls regardless of is there is data that meets the criteria to
be displayed?
It sounds like no data meet the criteria to be displayed. This could be due
to the parent/child link from the main form to the subform. Is the main form
[quoted text clipped - 10 lines]
 
D

Daryl S

Like Marshall said, if you open the subform to allow additions, then a blank
new record will allow the fields to be seen.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top