page margin

B

Bob Brannon

Hello,

I am using Access 2000 on XP Home SP2.

For the life of me I cannot figure out why I cannot change the bottom margin
of a report in page setup from 2.5" to 1". When I try it reverts back to
2.5.

The report is designed exactly the same as another report that uses
different a different criteria in the query. That report has not trouble
with the bottom margin being 1". Any suggestions?

Regards,
Bob Brannon
 
A

Allen Browne

All printers have an unprintable area at the bottom, but 1" should work
fine.

If you are able to create another report and set the bottom margin to 1",
then the report is corrupt, and the likely cause is Name AutoCorrect.
Details:
Failures caused by Name Auto-Correct
at:
http://members.iinet.net.au/~allenbrowne/bug-03.html

After turning off the Name AutoCorrect options, compact the database. Then
select the report in the Database window, copy (Ctrl+C), and paste (Ctrl+V),
supplying a new name for the copy of the report. Can you change the margin
of the copy?

If you're still stuck at this point, try the undocumented SaveAsText and
LoadFromText, or follow the steps for the first symptom in this article to
get Access to reconstruct if for you:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html
 
B

Bob Brannon

All the name autocorrect options are already turned off. However, I
compacted, copied, pasted, renamed adn still could not change the margin of
the copy.

I have another report that is exactly the same but uses a different cirteria
for the data reported, so I could probably just copy that and make the
changes.

I am not sure how to follow your recover from corruption process.


All printers have an unprintable area at the bottom, but 1" should work
fine.

If you are able to create another report and set the bottom margin to 1",
then the report is corrupt, and the likely cause is Name AutoCorrect.
Details:
Failures caused by Name Auto-Correct
at:
http://members.iinet.net.au/~allenbrowne/bug-03.html

After turning off the Name AutoCorrect options, compact the database. Then
select the report in the Database window, copy (Ctrl+C), and paste (Ctrl+V),
supplying a new name for the copy of the report. Can you change the margin
of the copy?

If you're still stuck at this point, try the undocumented SaveAsText and
LoadFromText, or follow the steps for the first symptom in this article to
get Access to reconstruct if for you:
Recovering from Corruption
at:
http://members.iinet.net.au/~allenbrowne/ser-47.html
 
A

Allen Browne

If you have another report you could use, just:
1. Delete the report.
2. Compact.
3. In the Database window, copy the report (ctrl+C) and paste (ctrl+V).
4. Open the copy in design view, and change the RecordSource.

It's worth persuing the process that gets Access to rebuild the database for
you. I end up using that about once a month with different people's
databases.
 
B

Bob Brannon

How do you do step 5 that you referred to in your earlier response. I don't
know how to get to that code window you referenced.

If you have another report you could use, just:
1. Delete the report.
2. Compact.
3. In the Database window, copy the report (ctrl+C) and paste (ctrl+V).
4. Open the copy in design view, and change the RecordSource.

It's worth persuing the process that gets Access to rebuild the database for
you. I end up using that about once a month with different people's
databases.
 
B

Bob Brannon

Sorry for the confusion if I caused any, the step 5 I was referring to was
your step 5 in the web page you reference for recovering from corruption
with a form or report that won't open.

I'm not sure how to get to the code window, but if I have I don't know what
you mean by "setting minimal references" or how the corrupt report will show
up.


How do you do step 5 that you referred to in your earlier response. I don't
know how to get to that code window you referenced.

If you have another report you could use, just:
1. Delete the report.
2. Compact.
3. In the Database window, copy the report (ctrl+C) and paste (ctrl+V).
4. Open the copy in design view, and change the RecordSource.

It's worth persuing the process that gets Access to rebuild the database for
you. I end up using that about once a month with different people's
databases.
 
A

Allen Browne

Press Alt+F11 to open the code window.
Alternatively, press Ctrl+G to open the Immediate window (which opens in the
code window).

Once you are there, you will find References on the Tools menu.
 
B

Bob Brannon

OK, I was able to get to the Code window before then but I do not know what
you mean by setting minimal references. The only ones checked are:

VB for apps
Access 9 obj lib
DAO 3.6 obj lib
OLE auto.
VB for apps extensibility 5.3

Should I uncheck all these?

And, on you web page for recovering from corruption you say the process will
cease at step 5 and see the name of the object that did not import. What is
the process that will cease? I was able to import the report whose margin I
cannot reset but I can't reset it in the new database either.


Press Alt+F11 to open the code window.
Alternatively, press Ctrl+G to open the Immediate window (which opens in the
code window).

Once you are there, you will find References on the Tools menu.
 
A

Allen Browne

Regarding references, you cannot remove VBA or Access libraries.
You probably want to keep the DAO one.
The other 2 are usually not needed.
More info about references:
http://members.iinet.net.au/~allenbrowne/ser-38.html

If the problem with the huge bottom margin applies to only the one report
(not to a new report, for example), here's another alternative.
1. Open the Immediate Window (Ctrl+G).

2. Enter something like this, replacing Report1 with the name of your
report:
SaveAsText acReport, "Report1", "C:\Report1.txt"

3. Delete the report.

4. Compact the database.

5. Open the Immediate window, and enter:
LoadFromText acReport, "Report1", "C:\Report1.txt"

SaveAsText and LoadFromText are undocumented, but can sometimes recover a
bad object.
 
B

Bob Brannon

I must be dense, how do I get to this "SaveAsText acReport"?

When I try Save as from the file menu a window comes up with the "as" grayed
out but set on report. Would this be because the report asks for some data
before it runs?


Regarding references, you cannot remove VBA or Access libraries.
You probably want to keep the DAO one.
The other 2 are usually not needed.
More info about references:
http://members.iinet.net.au/~allenbrowne/ser-38.html

If the problem with the huge bottom margin applies to only the one report
(not to a new report, for example), here's another alternative.
1. Open the Immediate Window (Ctrl+G).

2. Enter something like this, replacing Report1 with the name of your
report:
SaveAsText acReport, "Report1", "C:\Report1.txt"

3. Delete the report.

4. Compact the database.

5. Open the Immediate window, and enter:
LoadFromText acReport, "Report1", "C:\Report1.txt"

SaveAsText and LoadFromText are undocumented, but can sometimes recover a
bad object.
 
A

Allen Browne

Sorry, Bob. SaveAsText is an undocumented VBA command.
It creates a text file containing your object (in this case your report.)
You can then import it into another database with LoadFromText.

To use it:
1. Open the Immediate Window (Ctrl+G).

2. Type in the command, and press Enter.
 
B

Bob Brannon

Hello Allen,

The problem was I didn't know what you meant by the "Immediate Window". I
see now it is part of the VB window, which I have rarely used, but had
gotten to it a few days ago already. Sorry for the confusion.

Anyway, I tried what you said and the bottom margin still cannot be
adjusted. Any idea what that problem might be? By now I could have spent
less time just copying my other report and modifying the copy. However,
that would not provide a solution to the problem, just a work around. Now I
am really interested in figuring out the problem.

Any other suggestions?

Regards,
Bob Brannon


Sorry, Bob. SaveAsText is an undocumented VBA command.
It creates a text file containing your object (in this case your report.)
You can then import it into another database with LoadFromText.

To use it:
1. Open the Immediate Window (Ctrl+G).

2. Type in the command, and press Enter.
 
B

Bob Brannon

Guess we are not communicating here somehow. I did do the SaveAs and
LoadFrom and still cannot adjust the margin in the new report. So where do
we go from here. Please see my last message.


Now you have found the Immediate Window, try the SaveAsText and
LoadFromText.
 
A

Allen Browne

Ah, thanks for the clarification, Bob.

Re-reading the thread, you are sure that this problem does not occur with
other reports. For example, you are able to save a new report with a 1"
bottom margin. That proves that this is not something being enforced by the
printer driver itself. (It is still possible that the printer driver is
faulty, but I've never seen these symptoms from that cause.)

We have also tried to eliminate a corruption in the database as a cause, but
ensuring Name AutoCorrect is off, decompiling, exporting the report,
deleting it, and reimporting. That process should have shown up a problem if
the mdb was corrupt.

It's interesting that it sets the value to 2.5 when you type a 1, and that
this is the conversion factor between cm and inches. I wonder if there is
any chance that the Regional Settings for the computer are incorrect or
corrupted? It's a long shot, but you might like to open the Windows Control
Panel, and change the Regional Settings to something else. Then change it
back, and try opening Access again.

I'm not sure what else to suggest.
 
B

Bob Brannon

That didn't work either, unfortunately. Any other ideas or suggestions
where to go to figure it out? Seems most of the problems I find with any
software, there is no resolution for them.

Ah, thanks for the clarification, Bob.

Re-reading the thread, you are sure that this problem does not occur with
other reports. For example, you are able to save a new report with a 1"
bottom margin. That proves that this is not something being enforced by the
printer driver itself. (It is still possible that the printer driver is
faulty, but I've never seen these symptoms from that cause.)

We have also tried to eliminate a corruption in the database as a cause, but
ensuring Name AutoCorrect is off, decompiling, exporting the report,
deleting it, and reimporting. That process should have shown up a problem if
the mdb was corrupt.

It's interesting that it sets the value to 2.5 when you type a 1, and that
this is the conversion factor between cm and inches. I wonder if there is
any chance that the Regional Settings for the computer are incorrect or
corrupted? It's a long shot, but you might like to open the Windows Control
Panel, and change the Regional Settings to something else. Then change it
back, and try opening Access again.

I'm not sure what else to suggest.
 
B

Bob Brannon

Any interest in looking at the Database and report to see if you can figure
it out?


Don't know what else to suggest, Bob.
 
A

Allen Browne

Hi Bob

Hope you can understand that we cannot open everyone's databases for free,
or we would never get any paid work done.

Email me directly if you want to follow up further.
 

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

Similar Threads


Top