Form showing as blank with no controls

  • Thread starter Thread starter Ayo
  • Start date Start date
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?
 
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.
 
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?
 
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?
 
Back
Top