If it is an Android handset with a Google account setup then access could be possible by entering the Google account credentials, where the passcode is not known. Many manufacturers put up these instructions if you are locked out
If this reads slightly cryptic, you do not say what model handset is involved