Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print controls

Status
Not open for further replies.

Klepdog

Technical User
Oct 9, 2011
52
0
0
SE
I am currently using macros to open reports for print. Most of my reports need to be printed with a Landscape format. The problem occurs when my users go to print, the reports get printed in a portrait format. Is there a way to force print Landscape regarless of how the users printer is setup?

2nd the tables in my database use a one-to-many relationship. During the beta test of the database, one of the problems encountered was when deleting a record from a form. When the record is deleted, the record seems to go away, but after exiting from the form and then re-entering the form the record reappears. Is this caused by using a one-to-many (relationships are enforced for integrity and cascaded for deletion). If so, what can I do to fix this problem?

Thanks
Don
 
1 Specify the report to use the default printer and landscape. Lastly save the report.

2 If you are deleting the record, you should at that time be warned if the record cannot be deleted. Which side of the relationship are you deleting? How are you 'deleting' it?
 
1. I found a bit of code to use when load the report. "Application.Printer.Orientation = acPRORPLandscape" This seems to work regardless of the users printer preferences.

2. I am deleteing a record from the primary table and need the left join table associated record to delete as well.
 
If referential integrity and cascade deletes are on, it should simply delete both records (or more specifically all of them on the many side).

Which brings me back to how are you deleting the record? Pushing a button... what is the code or macro?
 
I used the button wizard to create a delete record button. The wizard created the macro. As for whar is exactly in the macro I do not know.
 
I create a form on the one side, used the button wizard to create a delelte after setting up the referential integrity and it did cascade delete the many side...

There must be something else at work on your end. I never cascade delete and have not set cascade update in several years... I am at a loss as to what to check.

Or wait a minute... the macro does some odd stuff if it fails... If I remember right it looked like it moves to the next record.

Try hitting the recordselector at left on the form (enable it if you need to) and hitting the delete key. See if that at least thows an error that makes some sense.
 
After playing with the relationships yesterday at work. I finally got it to work if I changed the relationship to a one-to-one with the referential integrity enforced and cascade for delete and update. I still do not know why this worked instead of the on-to-many! I did not change the macro, did not alter anything on the form, did not change any of the settings in the tables. I don't get it. Any suggestion on why?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top