How to hide / show MS Access DB form using vb.net
Remou's code should work to display invisible forms whose properties have been changed in HIDDEN in the access UI.
In VBA, to simplify Remou's example, it would be:
SetHiddenAttribute acForm, "MyHiddenForm", False
You might need to automate access with VB.NET to accomplish this, but SetHiddenAttribute is a top-level method of the Access application object, so it should be fairly straightforward to use. The VBA value with a constant constant acForm is 2, so you probably have to call it literally, something like this:
app.Application.SetHiddenAttribute 2, "MyHiddenForm", False
where the application object was initialized as an Access application. Dunno, as it is done in VB.NET, but in VBA it would be something like:
Set app = CreateObject("Access.Application")
I'm not sure if the correct syntax would be app.Application.SetHiddenAttribute, or if it would just be app.SetHiddenAttribute, but you can easily try any of them.
But keep in mind, it was Remu who gave the correct answer. I'm just thinking about how to get it to work in a programming environment that I don't even use!
source to share