Report casues crash

G

Guest

Hello. I have a report (based upon a crosstab query) that when opened causes
my db to crash about 50% of the time. In an effort to pinpoint the problem,
I have pulled up the crosstab query several times and it works fine. This
leads me to believe that the problem thus lies on the report side.

A little background on the ct query: There is a criteria column Where:
Between [Forms]![frmDateMenu2]![StartDate]
And [Forms]![frmDateMenu2]![EndDate] in which both of these dates have been
declared.

One thing that does seem odd is that when I pull up the report in design
mode, I get pop up menus asking for Parameter Values both StartDate and
EndDate. Does anyone know of some undocumented reason for this?
 
A

Allen Browne

Okay, could be several things going on here.

Firstly, a crosstab query gets its column headings from one of the fields.
That means Access has to run the query before it knows what the fields are.
And since it needs to know what the fields are for you to design the report,
it will ask you for the parameters even in design view. You can solve that
issue by listing the field names in the Column Headings property of the
report. The column names are now static, and so it does not have to run the
query to discover what they are.

With a bit of luck, you might find that setting the Column Headings solves
the crashes too. One if the things that can cause Access to crash is when
fields just disappear (as they can when the Column Headings are not
declared.)

You have declared the 2 parameters as Date/Time type fields. If the text
boxes on frmDateMenu2 are unbound, set their Format property to Short Date
so Access understands their data type on the form too, and won't
misinterpret them or allow bad dates.

Any other complexity that could be contributing to this crash? For example,
are there any subqueries in the crosstab? Or are there subqueries in lower
level queries that the crosstab is based on?

Are there any yes/no fields that you are grouping on? Particularly if these
are from the outer side of a join, they can crash Access.

How complex is the sorting'n'grouping within the report? The report itself
does further querying of the crosstab results based on what you enter into
the Sorting And Grouping dialog, so it is possible that the crashes happen
at this level.

Below are some generic steps for solving crashes and their associated
corruptions. They are not specific to the issue you describe, but may be
useful anyway.
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
and the code syntax is compilable.

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

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

briank said:
Hello. I have a report (based upon a crosstab query) that when opened
causes
my db to crash about 50% of the time. In an effort to pinpoint the
problem,
I have pulled up the crosstab query several times and it works fine. This
leads me to believe that the problem thus lies on the report side.

A little background on the ct query: There is a criteria column Where:
Between [Forms]![frmDateMenu2]![StartDate]
And [Forms]![frmDateMenu2]![EndDate] in which both of these dates have
been
declared.

One thing that does seem odd is that when I pull up the report in design
mode, I get pop up menus asking for Parameter Values both StartDate and
EndDate. Does anyone know of some undocumented reason for this?
 
G

Guest

Allen,
Thanks for the info ans steps to solve my report crashing problem. Can you
elaborate on listing the field names in the Column Headings property of the
report? My report is not set up with multiple columns so I am not sure if
you are suggesting this route or if there is a way to list field names in a
different report format.

Thank you.

Allen Browne said:
Okay, could be several things going on here.

Firstly, a crosstab query gets its column headings from one of the fields.
That means Access has to run the query before it knows what the fields are.
And since it needs to know what the fields are for you to design the report,
it will ask you for the parameters even in design view. You can solve that
issue by listing the field names in the Column Headings property of the
report. The column names are now static, and so it does not have to run the
query to discover what they are.

With a bit of luck, you might find that setting the Column Headings solves
the crashes too. One if the things that can cause Access to crash is when
fields just disappear (as they can when the Column Headings are not
declared.)

You have declared the 2 parameters as Date/Time type fields. If the text
boxes on frmDateMenu2 are unbound, set their Format property to Short Date
so Access understands their data type on the form too, and won't
misinterpret them or allow bad dates.

Any other complexity that could be contributing to this crash? For example,
are there any subqueries in the crosstab? Or are there subqueries in lower
level queries that the crosstab is based on?

Are there any yes/no fields that you are grouping on? Particularly if these
are from the outer side of a join, they can crash Access.

How complex is the sorting'n'grouping within the report? The report itself
does further querying of the crosstab results based on what you enter into
the Sorting And Grouping dialog, so it is possible that the crashes happen
at this level.

Below are some generic steps for solving crashes and their associated
corruptions. They are not specific to the issue you describe, but may be
useful anyway.
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are resolved,
and the code syntax is compilable.

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

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

briank said:
Hello. I have a report (based upon a crosstab query) that when opened
causes
my db to crash about 50% of the time. In an effort to pinpoint the
problem,
I have pulled up the crosstab query several times and it works fine. This
leads me to believe that the problem thus lies on the report side.

A little background on the ct query: There is a criteria column Where:
Between [Forms]![frmDateMenu2]![StartDate]
And [Forms]![frmDateMenu2]![EndDate] in which both of these dates have
been
declared.

One thing that does seem odd is that when I pull up the report in design
mode, I get pop up menus asking for Parameter Values both StartDate and
EndDate. Does anyone know of some undocumented reason for this?
 
A

Allen Browne

Sorry: Column Headings is a property of the *query*.

Open the crosstab query in design view.
Open the Properties box (View menu.)
List the possible values for the column headings, separated by commas.

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

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

briank said:
Allen,
Thanks for the info ans steps to solve my report crashing problem. Can
you
elaborate on listing the field names in the Column Headings property of
the
report? My report is not set up with multiple columns so I am not sure if
you are suggesting this route or if there is a way to list field names in
a
different report format.

Thank you.

Allen Browne said:
Okay, could be several things going on here.

Firstly, a crosstab query gets its column headings from one of the
fields.
That means Access has to run the query before it knows what the fields
are.
And since it needs to know what the fields are for you to design the
report,
it will ask you for the parameters even in design view. You can solve
that
issue by listing the field names in the Column Headings property of the
report. The column names are now static, and so it does not have to run
the
query to discover what they are.

With a bit of luck, you might find that setting the Column Headings
solves
the crashes too. One if the things that can cause Access to crash is when
fields just disappear (as they can when the Column Headings are not
declared.)

You have declared the 2 parameters as Date/Time type fields. If the text
boxes on frmDateMenu2 are unbound, set their Format property to Short
Date
so Access understands their data type on the form too, and won't
misinterpret them or allow bad dates.

Any other complexity that could be contributing to this crash? For
example,
are there any subqueries in the crosstab? Or are there subqueries in
lower
level queries that the crosstab is based on?

Are there any yes/no fields that you are grouping on? Particularly if
these
are from the outer side of a join, they can crash Access.

How complex is the sorting'n'grouping within the report? The report
itself
does further querying of the crosstab results based on what you enter
into
the Sorting And Grouping dialog, so it is possible that the crashes
happen
at this level.

Below are some generic steps for solving crashes and their associated
corruptions. They are not specific to the issue you describe, but may be
useful anyway.
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database
by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect
errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are
resolved,
and the code syntax is compilable.

briank said:
Hello. I have a report (based upon a crosstab query) that when opened
causes
my db to crash about 50% of the time. In an effort to pinpoint the
problem,
I have pulled up the crosstab query several times and it works fine.
This
leads me to believe that the problem thus lies on the report side.

A little background on the ct query: There is a criteria column Where:
Between [Forms]![frmDateMenu2]![StartDate]
And [Forms]![frmDateMenu2]![EndDate] in which both of these dates have
been
declared.

One thing that does seem odd is that when I pull up the report in
design
mode, I get pop up menus asking for Parameter Values both StartDate and
EndDate. Does anyone know of some undocumented reason for this?
 
G

Guest

Allen,
Declaring the possible column names in the heading's property section of the
cross tab query appears to be solving the problem. No crashes. TY.

Allen Browne said:
Sorry: Column Headings is a property of the *query*.

Open the crosstab query in design view.
Open the Properties box (View menu.)
List the possible values for the column headings, separated by commas.

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

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

briank said:
Allen,
Thanks for the info ans steps to solve my report crashing problem. Can
you
elaborate on listing the field names in the Column Headings property of
the
report? My report is not set up with multiple columns so I am not sure if
you are suggesting this route or if there is a way to list field names in
a
different report format.

Thank you.

Allen Browne said:
Okay, could be several things going on here.

Firstly, a crosstab query gets its column headings from one of the
fields.
That means Access has to run the query before it knows what the fields
are.
And since it needs to know what the fields are for you to design the
report,
it will ask you for the parameters even in design view. You can solve
that
issue by listing the field names in the Column Headings property of the
report. The column names are now static, and so it does not have to run
the
query to discover what they are.

With a bit of luck, you might find that setting the Column Headings
solves
the crashes too. One if the things that can cause Access to crash is when
fields just disappear (as they can when the Column Headings are not
declared.)

You have declared the 2 parameters as Date/Time type fields. If the text
boxes on frmDateMenu2 are unbound, set their Format property to Short
Date
so Access understands their data type on the form too, and won't
misinterpret them or allow bad dates.

Any other complexity that could be contributing to this crash? For
example,
are there any subqueries in the crosstab? Or are there subqueries in
lower
level queries that the crosstab is based on?

Are there any yes/no fields that you are grouping on? Particularly if
these
are from the outer side of a join, they can crash Access.

How complex is the sorting'n'grouping within the report? The report
itself
does further querying of the crosstab results based on what you enter
into
the Sorting And Grouping dialog, so it is possible that the crashes
happen
at this level.

Below are some generic steps for solving crashes and their associated
corruptions. They are not specific to the issue you describe, but may be
useful anyway.
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact/Repair

3. Close Access. Make a backup copy of the file. Decompile the database
by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access (holding down the Shift key if you have any startup code),
and compact again.

5. Open a code window.
Choose References from the Tools menu.
Uncheck any references you do not need.
For a list of the ones you typically need in your version of Access, see:
http://allenbrowne.com/ser-38.html

6. Still in the code window, choose Compile from the Debug menu.
Fix any errors, and repeat until it compiles okay.

At this point, you should have a database where the name-autocorrect
errors
are gone, the indexes are repaired, inconsistencies between the text- and
compiled-versions of the code are fixed, reference ambiguities are
resolved,
and the code syntax is compilable.

Hello. I have a report (based upon a crosstab query) that when opened
causes
my db to crash about 50% of the time. In an effort to pinpoint the
problem,
I have pulled up the crosstab query several times and it works fine.
This
leads me to believe that the problem thus lies on the report side.

A little background on the ct query: There is a criteria column Where:
Between [Forms]![frmDateMenu2]![StartDate]
And [Forms]![frmDateMenu2]![EndDate] in which both of these dates have
been
declared.

One thing that does seem odd is that when I pull up the report in
design
mode, I get pop up menus asking for Parameter Values both StartDate and
EndDate. Does anyone know of some undocumented reason for this?
 

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