@bastanu - They require a reference to the Microsoft Forms 2.0 Object Library - Which is somewhat odd, in that that is not selectable, but if you create a Userform (correct term) in Word or Excel and drag it over, Access adds the record for you.
And it isn't third party - well, it is in the sense that it is added code rather than what MS Access provided, but it isn't adding code from some unknown and untrusted website.
InputBox was one example, but since you asked ... You can do a LOT more with it than that. I have progress bars -
https://wellsr.com/vba/2017/excel/beautiful-vba-progress-bar-with-step-by-step-instructions/ - website is for Excel - You can't use Frames in UserForms In Access - I had to change that to textboxes, but once I did that, it works the same way.
I have a pop-up with 10 checkboxes and a button to select All/Deselect all.
I have an InputBox function, and I can have an Input box with two lines to fill in (for two different variables), and/or a combo box drop-down. And variable height depending on the length of the explanation text.
I have a pop-up calendar in the database that grays out non-work days (which aren't necessarily the same as recognized holidays) ...
Now, in fairness - I also use an Enhanced Message Box replacement (
https://datenbank-projekt.de/beispiele/improved-enhanced-message-box-ms-access) Olaf set that up as a standard Access pop-up form - not a userform (or whatever the term is, nobody has told me except not to call them that on here) - and I could probably do that with my items above, but:
- There would be more forms in the database that I never wanted users to select. I could make them hidden and probably prevent users from showing hidden forms, but then it is more complicated for me to use/maintain.
- In most cases, I either have a UserForm working in Word or in Excel, and I can just bring it over and/or modify another form that I previously brought over. It would take a lot of re-design to figure out how to do it with a true Access pop-up form with no gain.
@Pat Hartman - Not currently. I had issues with
@bastanu's code. His created database opened without the error message, but it didn't bring my forms over (and other items) over. When I imported the modules from his code to my rebuilt database or imported the form into his new database. I got the error message again. Right now, I am using
@Minty 's suggestion of exporting as a .bas file from the old database (one-at-a-time) and importing to the rebuilt database), compiling, C&R, saving and repeating. Cumbersome, but so far it is working. Once I get the error cleared, I'll try
@bastanu 's new code and find out I could have saved a lot of time.
@arnelgp - That's what I'm doing, but I've been having a hard time not transferring the corruption to the new database.