Function useUpdateAccessCode