By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,188 Members | 844 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,188 IT Pros & Developers. It's quick & easy.

Corrupt database

P: n/a
Help

My database acts very strange

I have a table named T1. (And a lot of other Tables, queries etc.) Here
my database works fine. Then I renamed a table from T1 to T1_imp, and
created a query named T1. Which has exactly the same fields as the
table T1_imp, but is filtered by a value from a combobox on a form.

When I run the query it shows Values as it should, but when I then try
to open a report which starts by creating the recordsource to the
report (in VBA) - it stops in the middle of the code - because now the
query T1 does not show any values anymore - and when a press debug, and
reset - the database closes down by it self.

It seems as the database is corrupt - I have tried to compress and
repair the database, but it does not help. The auto correct names is
not activated (Access 2003) -

I have worked on this database for many many hours - and I have no
backup which does not produce the same fault, so I really need some
HELP.

TIA
Jens

Oct 18 '06 #1
Share this Question
Share on Google+
3 Replies


P: n/a
JensT wrote:
Help

My database acts very strange

I have a table named T1. (And a lot of other Tables, queries etc.) Here
my database works fine. Then I renamed a table from T1 to T1_imp, and
created a query named T1. Which has exactly the same fields as the
table T1_imp, but is filtered by a value from a combobox on a form.

When I run the query it shows Values as it should, but when I then try
to open a report which starts by creating the recordsource to the
report (in VBA) - it stops in the middle of the code - because now the
query T1 does not show any values anymore - and when a press debug, and
reset - the database closes down by it self.

It seems as the database is corrupt - I have tried to compress and
repair the database, but it does not help. The auto correct names is
not activated (Access 2003) -

I have worked on this database for many many hours - and I have no
backup which does not produce the same fault, so I really need some
HELP.

TIA
Jens
Kill your report and create a new one would be my suggestion.

You do mention you create the T1 via VBA? Then what do you do? Do you
do something like
Me.Recordsource = strSQL
If so, do you do this in the OnOpen event of the report?

What I often times do is have a form that opens the report. Prior to
the report I define a filter. Ex:
strWhere = "State = 'CA'"
Then I open the report with
DoCmd.OpenReport "ReportName", , , strWhere

I prefer passing the filter to the report.
Oct 18 '06 #2

P: n/a
Hi Salad

Thanks for your answer

Unfortunately it is not only one report where the database acts weird -
but a whole bunch of reports

I do have the filter there since I have a lot of reports.

Thanks
Jens
salad skrev:
JensT wrote:
Help

My database acts very strange

I have a table named T1. (And a lot of other Tables, queries etc.) Here
my database works fine. Then I renamed a table from T1 to T1_imp, and
created a query named T1. Which has exactly the same fields as the
table T1_imp, but is filtered by a value from a combobox on a form.

When I run the query it shows Values as it should, but when I then try
to open a report which starts by creating the recordsource to the
report (in VBA) - it stops in the middle of the code - because now the
query T1 does not show any values anymore - and when a press debug, and
reset - the database closes down by it self.

It seems as the database is corrupt - I have tried to compress and
repair the database, but it does not help. The auto correct names is
not activated (Access 2003) -

I have worked on this database for many many hours - and I have no
backup which does not produce the same fault, so I really need some
HELP.

TIA
Jens
Kill your report and create a new one would be my suggestion.

You do mention you create the T1 via VBA? Then what do you do? Do you
do something like
Me.Recordsource = strSQL
If so, do you do this in the OnOpen event of the report?

What I often times do is have a form that opens the report. Prior to
the report I define a filter. Ex:
strWhere = "State = 'CA'"
Then I open the report with
DoCmd.OpenReport "ReportName", , , strWhere

I prefer passing the filter to the report.
Oct 19 '06 #3

P: n/a
JensT wrote:
Hi Salad

Thanks for your answer

Unfortunately it is not only one report where the database acts weird -
but a whole bunch of reports

I do have the filter there since I have a lot of reports.

Thanks
Jens
salad skrev:
>>JensT wrote:

>>>Help

My database acts very strange

I have a table named T1. (And a lot of other Tables, queries etc.) Here
my database works fine. Then I renamed a table from T1 to T1_imp, and
created a query named T1. Which has exactly the same fields as the
table T1_imp, but is filtered by a value from a combobox on a form.

When I run the query it shows Values as it should, but when I then try
to open a report which starts by creating the recordsource to the
report (in VBA) - it stops in the middle of the code - because now the
query T1 does not show any values anymore - and when a press debug, and
reset - the database closes down by it self.

It seems as the database is corrupt - I have tried to compress and
repair the database, but it does not help. The auto correct names is
not activated (Access 2003) -

I have worked on this database for many many hours - and I have no
backup which does not produce the same fault, so I really need some
HELP.

TIA
Jens

Kill your report and create a new one would be my suggestion.

You do mention you create the T1 via VBA? Then what do you do? Do you
do something like
Me.Recordsource = strSQL
If so, do you do this in the OnOpen event of the report?

What I often times do is have a form that opens the report. Prior to
the report I define a filter. Ex:
strWhere = "State = 'CA'"
Then I open the report with
DoCmd.OpenReport "ReportName", , , strWhere

I prefer passing the filter to the report.

Maybe create a new database. Then import all objects the the new
database.

Is it a specific table, in all reports that are bad...or is it any/all
tables that give erratic results?
Oct 19 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.