Hi and Welcome. My Name is ***** ***** I look forward to assisting you today with your question.
Unfortunately there is NO way to retrieve that passcode or get back to your iPad without the passcode (without erasing it). Your only option is to force-restore the iPad to factory settings through iTunes by putting it to DFU (Device Firmware Upgrade) mode, which will erase everything from it. This is how Apple designed it to protect the information of their users.
But if you had backed up your iPad to iTunes on your computer or iCloud, then you can restore all your data back after restoring your iPad from iTunes/iCloud. You can also redownload all your past purchases for free using the same account.
Follow the steps below to restore your iPad by putting it to DFU Mode.
First download and install latest iTunes on your computer from here : https://www.apple.com/itunes/download/
Then connect the iPad to your computer with the USB Cable.
Open iTunes application on your computer.
On your iPad press and hold the Home button and the Power button at the same time.
After EXACTLY 8 seconds release the Power button. Continue holding the home button until your iTunes shows a message telling you that it has detected an iPad in recovery mode.
Click OK or Restore
Note : Put it to DFU Mode while connected to computer and also in DFU Mode your iPad will remain blank and will be unresponsive. It is normal. If it is not showing blank/black screen, then repeat the steps again. Timing is critical when you put it to DFU Mode. So keep trying until it goes to DFU Mode. And it will take a while to restore it.
Remember, it may take a while to restore the iPad (the iOS firmware has to be downloaded, you will see the Download button at the top right corner of iTunes screen. Click it to see the time remaining)
Please let me know if that didn't work, so I will continue to help you until we fix the problem.
If you have iCloud enabled on it and also if your iPad is connected to WiFi/internet, then you can do the erase from iCloud - so you don't have to go through the restore steps.
On your computer, go to www.icloud.com
Login to your iCloud/Apple account. Click Find My iPhone. Select your iPad under All Devices. Click Erase button and it will be erased (if it is connected to WiFi network).
If that didn't work, then you have to restore it from iTunes application on your computer. Follow the instructions in my previous answer.
Note : If you want, I can remotely connect to your computer and fix your iPad myself for you while you watch. This is only an optional additional service. You can accept that remote service if you would like me to fix it for you or if you have any difficulty on following the steps above.
Let me know how it goes.