local lcUser, lcPass, lnHandle lcUser = alltrim(upper(This.txtUserName.Value)) lcPass = alltrim(upper(This.txtPassword1.Value)) lnHandle = SQLStringConnect('Driver=Microsoft ODBC for Oracle;UID=' + lcUser ; + ';PWD=' + lcPass + ';CONNECTSTRING=reg6;') if lnHandle > 0 SQLDisconnect(lnHandle) return .t. && password has not expired endif local lnRetVal local array laConnectError[1,1] lnRetVal = aerror(laConnectError) && lnRetVal = 3 for me if lnRetVal < 1 && this should never be true at this point but what the heck return .f. endif if laConnectError[1,1] = 1526 and laConnectError[1,5] = 28001 *!* ODBC error and Password Expired Error. Do nothing here. else return .f. endif local oNewPass oNewPass = newobject('NewPassword', 'appclass.vcx') oNewPass.Show() if oNewPass.lCanceled oNewPass.Release() return .f. endif lcPass = alltrim(oNewPass.txtNewPass1.Value) oNewPass.Release() lnHandle = SQLStringConnect('Driver=Microsoft ODBC for Oracle;UID=NPDES;PWD=' + NPDES_PASSWORD + ';CONNECTSTRING=reg6;') if lnHandle < 1 return .f. endif local lcSQL lcSQL = 'alter user ' + lcUser + ' identified by ' + lcPass lnRetVal = SQLExec(lnHandle, lcSQL) SQLDisconnect(lnHandle) if lnRetVal < 1 return .f. endif ** Next, replace the normal login form's [old] password ** with the new password which the click method uses to login ThisForm.txtPassword1.Value = lcPass MessageBox("Your password change was successful.", MB_ICONINFORMATION, "Notice...") return .t.After this point, my ususal login form completes the login using the new password without the user having to do anything else. If mCheckExpired returns FALSE, the click method stops and just returns to the login form for the user to either try again or cancel login.