UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Run-time Error '2585' Action Cannot Be Carried Out While, Access 2010    
 
   
SemiAuto40
post Dec 13 2017, 04:08 PM
Post#1



Posts: 459
Joined: 3-April 12
From: L.A. (lower Alabama)


This has got me good. I have a frm_Login and on the gotfocus() of the login command button I call the username and password code. After verifying the username and password I open frm_Methods and then attempt to close the login form frm_Login with a docmd.close acform, "frm_Login". Why am I getting a run-time error 2585. I don't think I'm processing anything. The close of the frm_Login is the last line of code. The only thing I can guess is that I am calling a sub DoLogin as part of frm_Login (which has all of the log in code and verification) from the gotfocus of the login command button. I just want to check the password control for validity + make this check after pressing <Enter> of the password control... so I don't have to take an extra step of clicking a button to start up. Where am I going wrong please?
Go to the top of the page
 
SemiAuto40
post Dec 13 2017, 05:07 PM
Post#2



Posts: 459
Joined: 3-April 12
From: L.A. (lower Alabama)


So it seems that it makes a huge difference where/what event that a docmd.Close acForm, "my_Form" gets called from. Putting this inside a txtPassword_AfterUpdate event allows it to work. Most every other place other than a button OnClick() just does not work!
Go to the top of the page
 


Custom Search
RSSSearch   Top   Lo-Fi    16th December 2017 - 06:07 AM