Form showing as blank with no controls

A

Ayo

How do I display a form that is based on a query when there is no record to
display. Right now, the form is just blank with no controls or anything else
on it.

DoCmd.OpenForm "frmSiteConfiguration",acNormal, "qry_Combined",
"tbl_SiteInformation.SiteID ='" & txtSiteID & "'" & " And
[Config_Technology]='" & cmdUMTS1900.Caption & "'" & " And
[tbl_SiteInformation.ProjectName]='" & txtProjectName & "'"

The form is based on a query and I have about 5 buttons on it to display
data based on 3 fields in the query criteria. There are no records for
UMTS1900 in the query so that when I click on the button for UMTS1900, the
form is shown completely blank. And there is no way to navigate away from it.
Is there a way to write a code that display the form with a blank record?
 
D

Dennis

Put your close form button and/or any other buttons that you would like to
see when the form is blank into the form header or footer section. They will
then still display when the form is blank due to no records.
 
A

Ayo

Thanks Dennis.

Dennis said:
Put your close form button and/or any other buttons that you would like to
see when the form is blank into the form header or footer section. They will
then still display when the form is blank due to no records.

Ayo said:
How do I display a form that is based on a query when there is no record to
display. Right now, the form is just blank with no controls or anything else
on it.

DoCmd.OpenForm "frmSiteConfiguration",acNormal, "qry_Combined",
"tbl_SiteInformation.SiteID ='" & txtSiteID & "'" & " And
[Config_Technology]='" & cmdUMTS1900.Caption & "'" & " And
[tbl_SiteInformation.ProjectName]='" & txtProjectName & "'"

The form is based on a query and I have about 5 buttons on it to display
data based on 3 fields in the query criteria. There are no records for
UMTS1900 in the query so that when I click on the button for UMTS1900, the
form is shown completely blank. And there is no way to navigate away from it.
Is there a way to write a code that display the form with a blank record?
 
A

Ayo

Thanks.

Allen Browne said:
The Detail section of the form goes blank when both:
a) there are no records, and
b) no new record can be added.

For details and workarounds, see
Why does my form go completely blank?
at:
http://allenbrowne.com/casu-20.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Ayo said:
How do I display a form that is based on a query when there is no record
to
display. Right now, the form is just blank with no controls or anything
else
on it.

DoCmd.OpenForm "frmSiteConfiguration",acNormal, "qry_Combined",
"tbl_SiteInformation.SiteID ='" & txtSiteID & "'" & " And
[Config_Technology]='" & cmdUMTS1900.Caption & "'" & " And
[tbl_SiteInformation.ProjectName]='" & txtProjectName & "'"

The form is based on a query and I have about 5 buttons on it to display
data based on 3 fields in the query criteria. There are no records for
UMTS1900 in the query so that when I click on the button for UMTS1900, the
form is shown completely blank. And there is no way to navigate away from
it.
Is there a way to write a code that display the form with a blank record?
 

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