Hey Marinemom2003,
Thanks for using Apple Support Communities. It sounds like you're trying to set up iCloud Keychain on your iPad. The passcode it's requesting would be an old passcode. Those details can be found in Step 4, here: Set up iCloud Keychain - Apple Support
4. If you choose to "Approve Later" when signing in to your Apple ID, you need to approve with an old passcode or from another device when prompted. If you're unable to approve, reset your end-to-end encrypted data when prompted.
If you're not able to approve it, you'll need to reset the data. A list of the data that is reset can be found in the link above titled "end-to-end encrypted data" or here: iCloud data security overview - Apple Support
We hope this helps.
Take care!