As far as I know - this is a no go. BUT, If you are up to it, many/most of the controls in MS Access have counterparts in VB. It is possible (noy, not just possible but fairly simple) to write a VBA program to place the information re the controls in a table (Control Name, Type, Left, Top, Height, Width, Control Source, On????Event ...) in a table. Now, the clever programmer could write a VB program to opne that table, read the form information and translate it to the equivalent VB Control. Then the going gets tough. Some things just will not translate. You need to identify what went awry and fix it.
I have done the first part many times. I have usually work as a scab, and often need to generate some cross-reference info quickly, so I do not do any harm. The part about generating the table of forms controls and attributes is straignt forward, consisting of a loop to go through all of the objects in the database, getting the info and placing it in a table.
I have done the second part once - with only limited sucess. Building the translation table (MS Access Objects/Controls to VB Objects/Controls) was not very good when the MS Access forms were displaying multiple rows of data. Of course, SOME grid was necessary, but beyond that it ggot VERY MESSY!!!! Also, while I could get the report info, VB STILL does not compare w/ MS Access in report generation (is there some deal w/ Seagate to keep vb report generation CRIPPLED?)
MichaelRed
There is nevertime to do it right but there is always time to do it over
With this in mind, knowing it is possible, I will attempt to build upon this. You have also addressed some concerns I may run into here within the next couple of hours (reports), so I may need your help again.
This may be too late to help, but there is an Access add-in utility called form2vb that will let you export an Access form to a VB .frm file. I don't believe it exports the code behind the form, but it can certainly save some time building the form itself. I don't recall now just where I found this, but a search should turn it up.
Also, if not too late, there is a better program that the "form2vb" program that will also convert your access vba code, macros, modules and reports to VB. It's called AccesstoVB.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.