From: Lay on
For source code browsing of software written in C, java, C++, there
are convenient and free source code browsing tools like source
navigator. This has been a problem since I started working on VBA. The
problem is that VBA source code are not single files
like .c, .h, .java. They are embedded inside the .mdb file. I have
searched on google but I could not find anything useful on this
aspect. Can the more experienced people here recommend any convenient
source code browser for VBA, if any?

Thank you in advance.
From: Stuart McCall on
"Lay" <lightaiyee(a)gmail.com> wrote in message
news:c854b0a0-94ba-4b6b-8e2f-b8bbfafe0cc1(a)n19g2000prf.googlegroups.com...
> For source code browsing of software written in C, java, C++, there
> are convenient and free source code browsing tools like source
> navigator. This has been a problem since I started working on VBA. The
> problem is that VBA source code are not single files
> like .c, .h, .java. They are embedded inside the .mdb file. I have
> searched on google but I could not find anything useful on this
> aspect. Can the more experienced people here recommend any convenient
> source code browser for VBA, if any?
>
> Thank you in advance.

There are two hidden Application methods you ought to know about: SaveAsText
and LoadFromText. You can use these like this:

Application.SaveAsText acForm, "Form1", "C:\Temp\Form1.txt"

This outputs Form1's module to a text file Form1.txt in your C:\Temp folder.
You can then view/manipulate it to your heart's content using any text file
tool you like. When you're done, re-load the source using:

Application.LoadFromText acForm, "Form1", "C:\Temp\Form1.txt"

Be sure to keep the file headers intact (you'll see what I mean when you try
it).

Not a perfect solution, but I hope it may help you.


From: christianlott1 on
On Jul 2, 3:48 am, "Stuart McCall" <smcc...(a)myunrealbox.com> wrote:
> "Lay" <lightai...(a)gmail.com> wrote in message

> There are two hidden Application methods you ought to know about: SaveAsText
> and LoadFromText. You can use these like this:

There's a great example somewhere of using the save and load as text
functions to reduce your db size.
From: Albert D. Kallal on
You're making the classic computer mistake of confusing logical view, vs.
the physical layout on disk.

If I take 10 separate source code files and place them into one zip file,
then all the sudden does this mean I can't browse and use each file
separately?

Keep in mind that even if you took all of those source files and compiled
into a single executable file, does that mean because we've got one single
resulting file, we can't browse and still use the source code ? The answer
of course no it is does not mean this. .

While access stores it parts in ONE file, the LOGICAL VIEW is SEPARATE
files.

The fact the matter access has supported Source Code control tools like
Visual Source safe for about 15 years now.

I'm not sure what the term is browse code means? You can simply open up the
access and browse code like I can and any other development system. Note
also that there's a global find and replace (that will even search all code
inside of a form and reports: - >so you can globally browse and search code
now).

If you're looking to do Source code versioning and use source code control
like you do in other development environments, you're absolutely free ad use
these tools in access. In fact doing so will not only allow youchecking out
of individual code modules, individual queries, individual forms and the
like, but also means that you can now have more than one developer working
in designing and developing on your project at the same time..

You can do some reading on source code control in access here:
http://msdn.microsoft.com/en-us/library/aa155494(office.10).aspx

The above MSDN article is for access 2000, which is now fully FIVE VERSIONS
old.

For access 2007, you'll find the developer extensions is here:
http://msdn.microsoft.com/en-ca/office/bb229700.aspx

In addition to the above extensions, you then have to be using something
that's compatible with visual source safe in terms of setting up a source
code depository.

So, do keep in mind that just like c++ and most development tools in our
industry, access supports source code control and versioning like those
development tools in our industry, and it has done so for very long time.

At the end of the day as long as that access development environment can
view your objects and conceptualize each object as an individual object that
can be checked in and out of the source code repository, then the fact that
it stores everything inside of one zip file or inside one directory folder
on your hard drive, or in fact inside of one access mdb file is 100% a MOOST
POINT and is not relevant to this discussion at all.

At the end of the day this means you're confusing logical view vs. the
physical view on the disk drive in terms of access. We do have source code
control availability. You do have to run and install the source code Add-In
for this feature to work.

However if I've misunderstood your question, and perhaps you're asking how
to browse code in access? Well, you you simply open up the code editor and
browse around and nothing stopping you from doing that?

As a few others mentioned here in this thread, you can export any object as
text (saveastext). Obviously the source code control systems rely on this
feature .

So while access has the capability of using in dealing with each object as a
separate Exe file, it's really not a big deal, it's not a big problem, and
like people you zip file to put a ringing together into one easy to use file
to move around from computer to computer, access naturally does this for
you.

At the end of the day, this means that it's more convenient to have
everything in ONE file so then you can simply make multiple copies of the
whole system with a simple cut + copy and paste instead of having a whole
mess of whole bunch of separate individual files which really substantially
increases your workload when dealing with an application with so many
different parts.

So access has a capability of dealing each individual part as a separate
text file, but for the most part it's not a problem. However, do keep in
mind if you're into source code control and versioning, or you need several
developers to work on your project at the same time, then you do have all of
the developer tools and options that the rest of the computing industry has
in this regards when working with ms access and source code control and
versioning.


Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
kallal(a)msn.com


From: Tony Toews on
On Fri, 2 Jul 2010 00:21:34 -0700 (PDT), Lay <lightaiyee(a)gmail.com>
wrote:

>For source code browsing of software written in C, java, C++, there
>are convenient and free source code browsing tools like source
>navigator. This has been a problem since I started working on VBA. The
>problem is that VBA source code are not single files
>like .c, .h, .java. They are embedded inside the .mdb file. I have
>searched on google but I could not find anything useful on this
>aspect. Can the more experienced people here recommend any convenient
>source code browser for VBA, if any?

Not exactly a source code browser but one very nice feature of the
free MZTools is the ability to do a find in the code and see a window
pop up showing all the locations of that string. Rather then the
built in one which shows the code one at a time.

I love this feature as well as the ability to see all the lines of
code which refernce the procedure on which I currently have the focus.
Lots of other useful features.

Tony
--
Tony Toews, Microsoft Access MVP
Tony's Main MS Access pages - http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
For a convenient utility to keep your users FEs and other files
updated see http://www.autofeupdater.com/