hi Robert,
The problem is a side effect of where the Loc:Invalid is being set. Unlike generated code, the LoginForm does the validation in the ValidateUpdate routine.
To correct the problem add the following line in, if the login is invalid.
Loc:InvalidTab = 0
for example;
if upper(Loc:Login) = 'DEMO' and upper(Loc:Password) = 'DEMO' and p_web.GetValue('hash') = p_web.GetSessionValue('hash')
p_web.ValidateLogin()
p_web.SetSessionValue('hash',0)
p_web.SetSessionLevel(1)
Else
loc:invalid = 'Loc:Login'
Loc:InvalidTab = 0
p_web.SetValue('retry','LoginForm')
loc:Alert = 'Login Failed. Try Again.'
End
Cheers
Bruce