Creating a "Print" command button

L

learningaccess

I have created a small database with very little information to be stored. I
need the ability to Open a report i created that will allow users to print
the information on the report. I have no problems creating the button and
creating a macro for it, but when i click the button in form view, it gives
the following error:

"The database engine could not lock table "TABLE NAME" because it is already
in use by another person or process"

It can't be that someone else has it open because i just created the
database and have it saved on my desktop. Anyone?
 
R

Rick B

The button wizard will allow you to build a print button and it will do all
the work for you. Did you create this button from scratch, or using the
button wizard?

You might try again using the wizard. I know that code works.

If you don't want to do so, then you would need to share with us the code
behind your button before we could give you an answer.
 
L

learningaccess

Actually my wizard hasn't worked since i installed Access on my computer.
Everytime i try to use the wizard it says "Active X can't create the object"
or something like that.

I am not familiar with code at all so I created the button using the command
button on the toolbox. I then went to the properties and created a macro for
the "On Click" section using OpenReport in the macro. If this doesn't help,
let me know and i will try to explain better.
 
R

Rick B

What is in your macro? If you simply run the macro does it work? Are you
saving the record on your screen before clicking the button? A common
mistake is to enter a record into a form, then click the "print" button
before the user has actually saved the record.
 
L

learningaccess

The macro has a save action and an OpenReport action. When i run the macro by
itself it works fine. I thought that it would work if i had an action to
close the form then try to open the report, but it still gives the error.
 
Top