hi experts
i now use this code
private sub login_click()
username.setfocus
if isnull (username) then
msgbox "please enter username",vbcritical,"username is missing"
elseif isnull (password) or password = "" then
msgbox "please enter password",vbcritical,"password missing"
end if
if username = "test1" and password = "test1" then
msgbox "access granted", vbinformation,"WelCome"
docmd.close
docmd.openform "splash screen"
end if
end sub
i now use this code
private sub login_click()
username.setfocus
if isnull (username) then
msgbox "please enter username",vbcritical,"username is missing"
elseif isnull (password) or password = "" then
msgbox "please enter password",vbcritical,"password missing"
end if
if username = "test1" and password = "test1" then
msgbox "access granted", vbinformation,"WelCome"
docmd.close
docmd.openform "splash screen"
end if
end sub