[AccessD] My latest bright idea, take two.

John Colby jwcolby at gmail.com
Sat Jan 29 08:03:50 CST 2022


Bill,  You assume too much!😁

The answer to your questions is no, I was driving down the road last night
blue skying.  I want to write a book.  I want to create a database that can
be built from scratch as the book evolves to demo the code in the book.  I
know just enough to be dangerous.

🤕And so I am dangerous.


On Sat, Jan 29, 2022 at 7:57 AM Bill Benson <bensonforums at gmail.com> wrote:

> This sounds like so much fun, if my eyes were not putting me on short
> term disability, I would love to work with you on this project John!
>
> You are trying to get this to work on your hard drive alone, before
> attempting to move it to the web I hope? I think you are counting on quite
> a lot going right, if you expect objects to get built by the user clicking
> macro buttons that will make calls to web functions that will download text
> files then run LoadFromText.
>
> Here are some considerations I had, without knowing anywhere near as much
> as yourself:
>
> * Will VBA wait to run the LoadFromText command, until the web command to
> download the text file is completed (i.e., are they synchronous?)
> * Forms will need to be saved and closed before they can be re-built using
> LoadFromText, right?
> * From what I recall, I needed to save new form modules after using
> LoadFromText directly in the VBE, and there was no way to save them
> silently, the Save command caused there to be popup prompts to save each
> individual object.
>
> I can only presume you have this all sorted or you would not even be going
> down this road.
>
>
>
> On Sat, Jan 29, 2022 at 7:30 AM John Colby <jwcolby at gmail.com> wrote:
>
> > I haven't tried it yet but...
> >
> > I want to publish my class stuff as an ebook a la Rocky.  The problem is
> > creating an example database that I can update for eratta or fixes.  The
> > code below supposedly saves and loads forms and modules.  What I do not
> > know yet is whether it actually saves the form itself complete with all
> the
> > controls, their positions etc.  If so then...
> >
> > Imagine a power shell script which the book buyer runs.  The script
> > downloads a small, mostly empty database from my github page and opens
> it.
> > When it opens an autoexec fires, which runs code in the one little module
> > in the mostly empty database.  The code loads a little switchboard form
> > with chapter buttons contained in a text file stored on my github page.
> > The click of each button loads any modules, classes and forms required
> for
> > a chapter from text files stored on my github page, essentially
> > bootstrapping a fully functional demo database from text files stored on
> my
> > github page.  If any of these files need changing or updating, I update
> > them and load them back to my github page.  The next time the user opens
> > the database, the changes are now loaded in the little database.
> >
> > If this works, I could build a maintainable demo database sitting in
> > GitHub.
> >
> > The user can use the switchboard to load demo modules, classes, forms and
> > reports, and then open forms which demo the functioning classes and how
> > they work.
> >
> > In the old days (I know them well) a publisher would build a CD which
> would
> > be contained in an envelope in the back of the book.  The method I am
> > discussing would replace that CD.
> >
> > Questions, comments or things I forgot or didn't think about?
> >
> > *The code I referenced above...*
> >
> > The little documented SaveAsText and LoadFromText may help if an object
> is
> > corrupted or otherwise behaving weirdly.  *Or for my purposes above...*
> >
> > At the debug/immediate window type:
> >
> > Application.SaveAsText acForm,"MyForm","c:\form.txt"
> >
> > You can load the file into a new MDB.
> >
> > Application.LoadFromText acForm,"MyForm","c:\from.txt"
> >
> >
> >
> >
> >
> > --
> > John W. Colby
> > Colby Consulting
> > --
> > AccessD mailing list
> > AccessD at databaseadvisors.com
> > https://databaseadvisors.com/mailman/listinfo/accessd
> > Website: http://www.databaseadvisors.com
> >
> --
> AccessD mailing list
> AccessD at databaseadvisors.com
> https://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>


-- 
John W. Colby
Colby Consulting


More information about the AccessD mailing list