|
-
Jul 11th, 2000, 09:21 AM
#1
Thread Starter
Lively Member
I have an Access DB that when one of the reports is opened the margins that are in page setup always default to 1" even after I change and then save.
If I open the report in design view and set the margins in page setup then, the margins will be okay the next time I run it. However the time after that they reset back to 1".
The DB was created with the various Access wizards. The report is opened via a click event with the Docmd.Openreport method and it has an SQL statement in it's filter property.
All the other reports work fine once the margtins are set, though their data is more static as the report that is having the trouble is the invoice report of the application. Thanks in advance.
-Jack Vinitsky
-
Jul 11th, 2000, 09:38 AM
#2
Check to see if the margins are hard coded in the program. They may be set somewhere in the code by the wizard.
Hope this helps
-
Jul 11th, 2000, 09:45 AM
#3
Thread Starter
Lively Member
Here is the code that opens it:
If Forms![Workorders by Customer]![Workorders by Customer Subform].Form.RecordsetClone.RecordCount = 0 Then
MsgBox "There is no data for this report. Canceling report..."
Else
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70
DoCmd.OpenReport "Invoice", acPreview
End If
Also in the report open event, there is code that opens a form as a dialog that previews a few of the fields that are in the report that is to be displayed.
-Jack Vinitsky
-
Jul 11th, 2000, 09:49 AM
#4
Check the code in the actual report, it may be on the load function of the report.
-
Jul 11th, 2000, 10:18 AM
#5
Thread Starter
Lively Member
I checked and there is no code that references any margins in any of the report events.
I put a DoCmd.Save in the report_save in the report close event. That preserves any margin changes to any old invoices. However when I type a new invoice it still defaults to 1" margins.
How would I reference the page setup margins? Perhaps I can put that in the report_open event?
-Jack Vinitsky
-
Jan 11th, 2001, 11:02 AM
#6
Hyperactive Member
I would also be very insterested in knowing how to set margins by bode. Tell me if you find how.
Thanks.
-
Jan 11th, 2001, 11:06 AM
#7
Thread Starter
Lively Member
Wow I forgot all about this post.
It turned out the problem was due to a bug in Access 2000 with the name autocorrect feature. Unchecking it fixed the problem. I believe the bug was fixed in SP1.
-
Jan 11th, 2001, 11:11 AM
#8
Hyperactive Member
Can you tell me exactly where I can uncheck that 'name autocorrect' feature?
Thanks.
-
Jan 11th, 2001, 11:22 AM
#9
Hyperactive Member
Don't bother - I found where. I just should search before asking. I'm too lazy nowadays..
have a nice day.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|