In my post above I said . I need to exclude the issuing of any key where The [used] field in the New_key_register table is False.
I should have said True
I’m getting old!!