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

Macro

Status
Not open for further replies.

Ielamrani

MIS
Jul 7, 2005
183
US
Hi,
I am trying to run a macro when a form opens but I am having trouble. The Macro contains A Make table Query.
Here is the code I put on (ON OPEN):

Docmd.RunMacro "Macro1"

I am getting this message:
the database engine could not lock table 'tablename'because it's already in use by another person or process.

Thanks in advance

Ismail
 
Ismail
Is the form based on the same table you are trying to make?

Tom
 
I did it.

Docmd.RunMacro "Macro1"
Docmd.OpenForm "Form1"

I added the second line to the code and it worked.

Thanks for trying

Ismail
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top