question

JohnCTX-6479 avatar image
0 Votes"
JohnCTX-6479 asked ·

Exporting an XSL, XML file formats from Microsoft Access to Visual Studio IDE

I may have successfully exported a Microsoft Access form file into an XSL, and an XML file (two files) to be exact.

What's next is that I want to import them into the Visual Studio IDE using C# programming techniques.

Can that be done?

If it can be done, can users provide me some steps?

Regards,

JohnCTX

dotnet-csharpwindows-formsoffice-vba-devoffice-access-dev
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

AlbertKallal-4360 avatar image
1 Vote"
AlbertKallal-4360 answered ·

Do you mean the data or the form layout?

So the first idea - data? Sure!

So the 2nd idea - the form layout? - hum, no! - that not really going to help much.

You can no more say take a form from VB6, and say use it in Access. Or even vb.net for that matter.
Or you can no more take a form laid out for a vb form, and say use it on your Android phone.

They are all very different architectures. And you really can't take a power-point slide and say convert that to some form in Visual Studio either. So this is really apples and oranges.

I can't say there is much to be had or gained from pulling the "source" that created that screen on that Android phone, or in ms-access or in power-point and THEN trying to pull that into Visual Studio.

Just like a lawn mower is different then a helicopter and few things can be switched between the 2 with much success.

Perhaps I am misunderstanding your question?

You could I suppose look at the source that created the Access form, but I don't think really much can be gained from that source as opposed to looking at the screen + form you see in Access.

In other words, there not a practical transfer, or transformation ability between these two systems.

About the only thing you can salvage in such projects? Well, the data can be imported from Access say into SQL server. Or VS and .net code can certainly open and consume the MS-Access database and use that database directly. In fact this works quite well and is OFTEN data. So you can certainly write .net code and use sql and use + consume the access database. (the data part - tables + data).

And you can often salvage "some" VBA code (the language used in MS-Access code) and use that code in vb.net. (however, often even that not worth the efforts - syntax of the two languages are dissimilar).

So you can pull + copy some VBA code into VS. However such code will still require hand fixing and hand coding and re-writing as .net (say vb.net code). And once again, no automated tools of any real value will help you much.

About the only automated system of code converting that works well? Well, code converters from vb.net to c#, or going from C# to vb.net works quite well. But that's because they are both Visual Studio systems and built around the .net system. For anything, from desktop FoxPro, dbaseIII, Ms-access etc? You can salvage the data from such applications.

but the screens and forms? Nope! You can use those screens as a guide and layout or a so called "specification" for your .net application. So use the screens etc. as a "design document", but not at a automated code level.

It is a essentially a manual process to take a power-point slide, ms-access form, Android Form, and re-create that "thing" in Visual Studio. It simply a different system and different architecture - kind of similar to that lawn mower and the helicopter. About the only thing they have in common is they are both machines, or in this case both software systems.

Feel free to expand on your question. It is certainly possible I am miss-understanding the goal here. If this is just a data transfer of some sort, then all good! But that of moving software say written in FORTRAN and converting to COBAL, or BASIC, or vb.net? Not really all that valuable - they are too different and built using different tools and approaches.

As a result - they don't have much in common, and thus not much can be salvaged at the code level. You have to re-build at the code and application level as a result.


Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada

· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Here I have this screenshot.

Regards,
JohnCTX
!

70267-xml-viewer.png


0 Votes 0 ·
xml-viewer.png (79.7 KiB)

I believe that Microsoft Office was developed in C++, and not in C# or VB.net right?

Regards,

JohnCTX

0 Votes 0 ·

That is correct. but then again, the fact that say FoxPro, or Power-point was developed say with c++, then that still really does not help nor suggest a viable path in terms of converting different systems written with different concepts in mind.

The form and object model was a custom design for Access. It thus does not follow say the form and object model for VB6, or anything built say in .net. In fact, forms built say in Visual Studio using c++ or VB at that time frame I think DID SHARE the same forms object model, but Access did not.

So, as noted, there not really a one to one design or converting process. Now to be fair, I suppose one could code up something that might translate the Access form layout to say a .net form. That is possible - but you be coding this out.

I suspect that using Access screens as a "design document" would be better and the code that drives the application is the REAL value + cost anyway - and that's that's not automatic.

0 Votes 0 ·
Show more comments