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!

Button on Form locks up Database

Status
Not open for further replies.

CandyT

Technical User
Jan 7, 2003
17
US
I have added a button onto a form that runs a macro. The macro runs two queries and also closes the form that the button is in. For some reason, as soon as the queries are processed, the database locks up. The form never closes and I have to shut down the database. Has anyone ever run across such an issue? Do you have any suggestions as to where to start checking for an error?

Candy T
 
Have you run the macro without the line that closes the form?

ProDev, MS Access Applications
Visit me at ==> Contact me at ==>lonniejohnson@prodev.us

May God bless you beyond your imagination!!!
 
I can run the macro with AND without the Close Form piece and from the macro itself, it runs fine. However, I attach that macro to a button on a form, and it locks up. I also tried it with and without Close Form from the button as well and no dice. However, I removed the Echo - Off part of the macro and rebuilt the form from scratch and that seems to have done it. Not sure why that would cause a problem, I thought I had used it that way before.

Candy
 
The unpredictabilty of Macros (sometimes they work, sometimes they don't, sometimes they do and don't) is one of the reasons that most seasoned developers advise against using them, preferring VBA code instead.

The Missinglinq

"It's got to be the going,
not the getting there that's good!"
-Harry Chapin
 
Now you KNOW that isn't what I want to hear. I am having a tough time learning vba - not sure of the best way to get started. any suggestions?

Candy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top