To Code or Not to Code

S

Sandy

Good morning!

My team is considering building forms in code so they will dynamically open
and close upon exiting the database. The question is, "is creating dynamic
forms from code better than housing static forms in the database in terms of
size and efficiency?"

In addition to the above, the reason we began to consider building forms in
code was to also have the form change appearance based on the user logged
into the database.

Your advice on the above is much appreciated!

Regards,

Sandy S.
Database Coordinator
 
R

Roger Carlson

Well, I've never done it, so this is conjecture, but I can't believe it
would be better in either storage or efficiency.

Storage: When you create an object, even programmatically, the database has
to grow to hold it. There is actual code behind those forms (that you will
never see) that must be held somewhere. When you delete it, the space is
neither returned to the system NOR is it reused. Every time you open the
app, it will grow. Whereas if you create and compile your "static" form,
this will not happen.

Efficiency: Your application will also be slower to open because all of
your forms will have to be created on the fly and THEN compiled -- Every
time!

I can't see any advantage to doing this just so different users can see
forms differently. You could do this far more easily with a combination of
Access Security and coding on saved forms.

My opinion.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
T

Tim Ferguson

The question is, "is creating dynamic
forms from code better than housing static forms in the database in
terms of size and efficiency?"

Actually, all forms and windows are built dynamically. What looks like an
Access object is simply a list of objects to be requested from the OS at
runtime. I don't see what advantage would be gained from storing the
instructions to build the instructions to request the objects.

There could be some gain in flexibility -- if you could read a recordset,
examine its fields and field types and then draw up the form, then that
would make maintenance easier. Then again, you may as well go the whole
distance and just learn C++ or cee-box or whatever the current windows
langauge is.

All the best


Tim F
 
S

Sandy

Tim and Roger,

Thank you both for your opinions! I can't believe I didn't think of the fact
that the forms aren't truly "static" - been a long week :)

I believe we are doing a pretty nice job of controlling the users view of
objects with VBA and if there's really no advantage to gain for creating
forms on the "fly" then I would much rather not worry about it! LOL

Thanks again gentlemen.

Sandy S.
Database Coordinator
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top