Access crashes when opening a Report

E

eschloss

Access 2003

I have a report which contains only a subform(Child21) in its Detail
section. Access crashes after I place the following line in the report's On
Open event:

[Child21].Requery

There are no Child/Master links between the report and subform. The subform
is actually a barchart form I made which uses mulitple recordsets to gather
information.

I have tried the following:
Renaming the subform.
Turning Name Autocorrect off.
Creating a new database with Name Autocorrect off then importing all objects.

Please help. What am I missing?
 
E

eschloss

The report now displays, but the subform does not return any information.

Based on reading other explanations for this problem, I confirmed that the
forms(test) Data Entry property is "No". Also, the only connection the
subform(Child21) has to its form(test) is the "Source Object" field which is
"Form.test". I gather I need something else in addition to this.

Also, there is no Record Source specified for the Report containing this
subform(Child21).

Hopefully this informations clearly points out a rookie mistake I made.
Thanks Duane.

Duane Hookom said:
Try moving the code to the On Format event of the Detail section.
--
Duane Hookom
Microsoft Access MVP


eschloss said:
Access 2003

I have a report which contains only a subform(Child21) in its Detail
section. Access crashes after I place the following line in the report's On
Open event:

[Child21].Requery

There are no Child/Master links between the report and subform. The subform
is actually a barchart form I made which uses mulitple recordsets to gather
information.

I have tried the following:
Renaming the subform.
Turning Name Autocorrect off.
Creating a new database with Name Autocorrect off then importing all objects.

Please help. What am I missing?
 
J

Jeff Boyce

I don't know if this could be a factor, but your description seems to
indicate that you are trying to embed a form (subform) in a report. Why is
that? Why not embed a report (subreport) in a report?

Regards

Jeff Boyce
Microsoft Office/Access MVP

eschloss said:
The report now displays, but the subform does not return any information.

Based on reading other explanations for this problem, I confirmed that the
forms(test) Data Entry property is "No". Also, the only connection the
subform(Child21) has to its form(test) is the "Source Object" field which
is
"Form.test". I gather I need something else in addition to this.

Also, there is no Record Source specified for the Report containing this
subform(Child21).

Hopefully this informations clearly points out a rookie mistake I made.
Thanks Duane.

Duane Hookom said:
Try moving the code to the On Format event of the Detail section.
--
Duane Hookom
Microsoft Access MVP


eschloss said:
Access 2003

I have a report which contains only a subform(Child21) in its Detail
section. Access crashes after I place the following line in the
report's On
Open event:

[Child21].Requery

There are no Child/Master links between the report and subform. The
subform
is actually a barchart form I made which uses mulitple recordsets to
gather
information.

I have tried the following:
Renaming the subform.
Turning Name Autocorrect off.
Creating a new database with Name Autocorrect off then importing all
objects.

Please help. What am I missing?
 
E

eschloss

Yes Jeff, I am trying to embed a form into a report. Just seemed logical to
me at the time. Is embedding a report into another report easier to do? If
so, I have no objection going that route. It would just bother me to leave
my current situation unresolved.

I'll give it a try regardless and get back to you guys.

Jeff Boyce said:
I don't know if this could be a factor, but your description seems to
indicate that you are trying to embed a form (subform) in a report. Why is
that? Why not embed a report (subreport) in a report?

Regards

Jeff Boyce
Microsoft Office/Access MVP

eschloss said:
The report now displays, but the subform does not return any information.

Based on reading other explanations for this problem, I confirmed that the
forms(test) Data Entry property is "No". Also, the only connection the
subform(Child21) has to its form(test) is the "Source Object" field which
is
"Form.test". I gather I need something else in addition to this.

Also, there is no Record Source specified for the Report containing this
subform(Child21).

Hopefully this informations clearly points out a rookie mistake I made.
Thanks Duane.

Duane Hookom said:
Try moving the code to the On Format event of the Detail section.
--
Duane Hookom
Microsoft Access MVP


:

Access 2003

I have a report which contains only a subform(Child21) in its Detail
section. Access crashes after I place the following line in the
report's On
Open event:

[Child21].Requery

There are no Child/Master links between the report and subform. The
subform
is actually a barchart form I made which uses mulitple recordsets to
gather
information.

I have tried the following:
Renaming the subform.
Turning Name Autocorrect off.
Creating a new database with Name Autocorrect off then importing all
objects.

Please help. What am I missing?
 
E

eschloss

OK, changing my form into a report and embedding that into another report
worked mostly. However, it is obvious that the subreport information is
displayed on top of the subreport control. I say this because I can see the
control border(easy to remove) and the name of the subreport(Child321)
underneath the subreport information.

1. How can I remove the name? When I set Visible = No, for the subreport,
the subreport doesn't run.

2. Also, in my form code, I had the following lines:

Me.InsideWidth = 6.5 * 1440
Me.InsideHeight = 8.25 * 1440
Me.Width = 6.5 * 1440
Me.Detail.Height = 8.25 * 1440

What are their equivalents for a report? Does Me.Section(0).Height register
the same as Me.Detail.Height to a report?

3. Less importantly, I am using Stephen Lebans vertical justification
module. When the code ran as a form, all text was vertically centered.
However, running that same code as a report, all text slightly favors the sub
center position. Any idea why?

Thanks guys.

eschloss said:
Yes Jeff, I am trying to embed a form into a report. Just seemed logical to
me at the time. Is embedding a report into another report easier to do? If
so, I have no objection going that route. It would just bother me to leave
my current situation unresolved.

I'll give it a try regardless and get back to you guys.

Jeff Boyce said:
I don't know if this could be a factor, but your description seems to
indicate that you are trying to embed a form (subform) in a report. Why is
that? Why not embed a report (subreport) in a report?

Regards

Jeff Boyce
Microsoft Office/Access MVP

eschloss said:
The report now displays, but the subform does not return any information.

Based on reading other explanations for this problem, I confirmed that the
forms(test) Data Entry property is "No". Also, the only connection the
subform(Child21) has to its form(test) is the "Source Object" field which
is
"Form.test". I gather I need something else in addition to this.

Also, there is no Record Source specified for the Report containing this
subform(Child21).

Hopefully this informations clearly points out a rookie mistake I made.
Thanks Duane.

:

Try moving the code to the On Format event of the Detail section.
--
Duane Hookom
Microsoft Access MVP


:

Access 2003

I have a report which contains only a subform(Child21) in its Detail
section. Access crashes after I place the following line in the
report's On
Open event:

[Child21].Requery

There are no Child/Master links between the report and subform. The
subform
is actually a barchart form I made which uses mulitple recordsets to
gather
information.

I have tried the following:
Renaming the subform.
Turning Name Autocorrect off.
Creating a new database with Name Autocorrect off then importing all
objects.

Please help. What am I missing?
 
D

Duane Hookom

1. The "name" is a label that you can select and delete
2. Just set the properties in design view. You didn't provide any indication
of why you think you need code to do this. When checking heights of "Can
Grow" controls in a report, you must use code in the On Print event. Once the
On Print event has started, it's too late to set any control properties.
3. Happy Thanksgiving Mr. Boyce. I'm thankful you are going to answer this ;-)

--
Duane Hookom
Microsoft Access MVP


eschloss said:
OK, changing my form into a report and embedding that into another report
worked mostly. However, it is obvious that the subreport information is
displayed on top of the subreport control. I say this because I can see the
control border(easy to remove) and the name of the subreport(Child321)
underneath the subreport information.

1. How can I remove the name? When I set Visible = No, for the subreport,
the subreport doesn't run.

2. Also, in my form code, I had the following lines:

Me.InsideWidth = 6.5 * 1440
Me.InsideHeight = 8.25 * 1440
Me.Width = 6.5 * 1440
Me.Detail.Height = 8.25 * 1440

What are their equivalents for a report? Does Me.Section(0).Height register
the same as Me.Detail.Height to a report?

3. Less importantly, I am using Stephen Lebans vertical justification
module. When the code ran as a form, all text was vertically centered.
However, running that same code as a report, all text slightly favors the sub
center position. Any idea why?

Thanks guys.

eschloss said:
Yes Jeff, I am trying to embed a form into a report. Just seemed logical to
me at the time. Is embedding a report into another report easier to do? If
so, I have no objection going that route. It would just bother me to leave
my current situation unresolved.

I'll give it a try regardless and get back to you guys.

Jeff Boyce said:
I don't know if this could be a factor, but your description seems to
indicate that you are trying to embed a form (subform) in a report. Why is
that? Why not embed a report (subreport) in a report?

Regards

Jeff Boyce
Microsoft Office/Access MVP

The report now displays, but the subform does not return any information.

Based on reading other explanations for this problem, I confirmed that the
forms(test) Data Entry property is "No". Also, the only connection the
subform(Child21) has to its form(test) is the "Source Object" field which
is
"Form.test". I gather I need something else in addition to this.

Also, there is no Record Source specified for the Report containing this
subform(Child21).

Hopefully this informations clearly points out a rookie mistake I made.
Thanks Duane.

:

Try moving the code to the On Format event of the Detail section.
--
Duane Hookom
Microsoft Access MVP


:

Access 2003

I have a report which contains only a subform(Child21) in its Detail
section. Access crashes after I place the following line in the
report's On
Open event:

[Child21].Requery

There are no Child/Master links between the report and subform. The
subform
is actually a barchart form I made which uses mulitple recordsets to
gather
information.

I have tried the following:
Renaming the subform.
Turning Name Autocorrect off.
Creating a new database with Name Autocorrect off then importing all
objects.

Please help. What am I missing?
 

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