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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

printing current record

Status
Not open for further replies.

accdot

Programmer
Jun 4, 2004
1
US
I am trying to print the current record in an open form. I have a print button with the fallowing wizard generated code in the event

DoCmd.DoMenuItem acFormBar, acEditMenu, acSelectRecord, , acMenuVer70
DoCmd.PrintOut acSelection

This causes the record to print but afterwards 2 activeX buttons I use to trigger the activeX calender disappear and no longer respond to clicks.

Also, the record always prints the background image to long. Is there anyway to prevent this.
 
Try this: (If this is close to what you are asking):

Create a Macro and name it say; Print Current Record.
In the first Macro Action line select: RunCommand and in the command line select; SelectRecord.
In the second Action line select; PrintOut and in the Print Range line select; Selection.

Then in your form design, create a command Print button and in the OnClick event, select the Macro.


Thomas Bailey
tomcat@reportcop.com
 
Suggestion --- take a look at the following.


This will tell you how to print the current record using a report. Although you can print a form, that is not what it was designed for. The report gives you much more flexibility and you only have to have on the report those objects you wish.

In addition, I would suggest using code instead of a macro. Again, there is a great deal more that can be done with code.

Good Luck!

An investment in knowledge always pays the best dividends.
by Benjamin Franklin
Autonumber Description - FAQ702-5106
 
I have a form with an "Add Record" button. We want to print the contents of the form from the current record before adding it to the table. When I write a report to print the current record and invoke it by clicking a print button, it can't find the record because it hasn't been written to the table yet. The report gets its records from the table. The form does not have a "search" or "edit" function; it is only for users to enter new info and add it to the database. Any ideas? Ideally I'd like to have one button on the form to add and print the single record.
 
Please disregard my reply...I inadvertently replied to yours instead of posting a new question. sorry!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top