Dynamic/reusable forms

Over 40 posts in this thread!!! ---- You don't appear to be able to convey your message very well.... In your last post you give the impression that it's everybody else's fault!!!!

Don't you think you should look closer to home???
Hi Uncle Gizmo,

Well, most of the posts are answers to the posts like yours. In fact it is a waste of effort from both sides.

But, to stay positive, I published an example as an alternative to cascaded listboxes.

Imb.
 
@ Ibm,

From the description of what you are trying to do, Access may not be the best fit. You would want a more generic environment where you can have a data table for events for each field and use Object Oriented Programing for your library. This would allow you to create controls as needed instead of having to preposition them. Also avoids issues Access has with creating and destroying controls.

Have you looked into VB?
 
@Imb
I must confess I have no idea of what this thread is about, but based on the first few posts, it seems you're trying to get ideas or contributions that help you scale your currently 50MB+ code base. But instead of scaling your app, what scaled is the heat in this thread in terms of the skepticism towards the solution you're currently showing, which you say is a single form that morphs into controls and that this approach helps you maintain more than 100 applications that may or may not be different.

Question 1:
Is the summary correct?

Question 2:
What are you actually doing? Are those textboxes being created on the fly or are they becoming visible?

Question 3:
How does this approach actually help you maintain many applications?

Question 4:
Did you even try to use classes to build your forms?

Question 5:
Do you know other technologies, like HTML or WPF, do this by default and are arguably much easier to write than making this work with Access?
 
@Imb
I must confess I have no idea of what this thread is about, but based on the first few posts, it seems you're trying to get ideas or contributions that help you scale your currently 50MB+ code base. But instead of scaling your app, what scaled is the heat in this thread in terms of the skepticism towards the solution you're currently showing, which you say is a single form that morphs into controls and that this approach helps you maintain more than 100 applications that may or may not be different.
Hi Edgar_,
I really feel more comfortable in the discussions with you.
My purpose is to present a way to develop applications very fast, for non-commercial organizations, that have not the budget to buy commercial software, and don't have the expertise to make these applications themselves. To service all kind of situations the program must be extreme flexible. And here starts the poo, poo and bla, bla.

Question 1:
Is the summary correct?
I am not scaling the code base, just to scale. The purpose is to add functionality and flexibility, whatever that is.
In standard Access all is fixed around forms, that all must be defined in the development mode of the application. In my opinion they are too static, because they can't be shared between applications. And if you encounter a special case, a new form must be defined.
Through many generalizations of code I came to the conclusion that not the form is the crucial object, but the control.
In standard Access, that is also accepted, and can be handled control classes. But still the static forms are there.
In my concept the form is reduced to a carrier of controls, and the controls are tuned to their "all-in" meaning (in standard Access terms including BeforeUpdate, AfterUpdate, Exit, etc
I really hope you see this not as bla, bla, but as a different way to use Access.
Question 2:
What are you actually doing? Are those textboxes being created on the fly or are they becoming visible?
With regard to the above, "The form" (in fact I use two template forms, one for continuous overviews and one for all the rest) is tuned in detail in the Open event of the form, through generalized code blocks, and these can be shared. The controls are already there, but must be "activated". An additional advantage is that you can create in memory all kind of form-representations to suit any situation.
It is even possible that a form on the screen, can be populated by a different overview from a different application.
But it seems all bla, bla in this community.
Question 3:
How does this approach actually help you maintain many applications?
In the separate applications I have no "hard-coded" forms, but only modules with generalized building blocks.
The effects of maintenance of the code base, is immediately reflected in all applications.
I also have one specialized database (DB.mdb) that can analyze every other application, and make corrections if necessary.
Also, in the develop-fase of an application I can automate the steps of adding table, modifying tables, adding field, modifying fields, etc. This only on the base of the tablename, and an "all-in" meaning of the control to be used. One of the "all-in" properties is, where the value of the control is stored: table/Item, field, type.
Modifications afterwards are as easy. All DDL-modifications of the FE are stored, including the procedures that are necessary to do for instance a fieldtype change. This is automatically synchronized on installation of a new version.
Question 4:
Did you even try to use classes to build your forms?
That is only necessary if you have many static forms, that must handle the different types of control per form. In principle I have one "fluffy" form.
Question 5:
Do you know other technologies, like HTML or WPF, do this by default and are arguably much easier to write than making this work with Access?
That is the point I want to clarify: that it is also possible in Access, with a different look towards forms.

Parallel to these "dynamical" forms I use "dynamical" reports: general building blocks to create HTML- or RTF-files on the spot by re-use of code. But that is an other story.


For explaining the concept you must know the total concept, but also all details, because these are determining the flexibilty.
I don't believe that from the code alone you can build a true view of the concept.
A working sample database does not give more insight, because then you can add records, and modify fields, and see all kind of handy things, but don't add to an understanding.
All is already in Access, but not integral.

Thanks to your questions, I have - finally - got the opportunity to clarify a little more what this concept means.

Thanks Edgar_,

Imb.
 
Last edited:
I have been following this lengthy thread from the start with both interest and a huge sense of frustration.
I have also seen some of your posts on other forums where I think your username is imb-hb.

As you may know I run the Access Europe User Group and am always on the lookout for innovative uses of Access that stretch the boundaries of what it can achieve. I thought initially that this topic might be an excellent candidate for a future presentation. However, over 50 posts in and I’m still utterly baffled by what this is all about.

I have long been an advocate both of reusable code and multi-purpose forms and have extensively used that approach in several of my commercial apps. For example, one of my commercial apps for schools has several multi-purpose forms used for selecting specific objects and data.

The multipurpose aspect is done using a combination of open args and controls that may be visible / hidden / enabled / disabled / locked / unlocked / moved / change caption / change use etc depending on the specific purpose / tag value.

It took years to develop and the approach works well. However, design view is a total mess with a large number of overlapping controls.

Similarly, each additional usage becomes increasingly complex and difficult to troubleshoot. Eventually, I reached a point where it was taking up more time to maintain than the amount of time it was saving and called a halt.

This method may or may not be similar to what you are doing. I’m really not sure as, despite carefully reading the entire thread, I’m still totally unsure what your approach actually is.

Your responses to the many experienced developers who have tried asking for clarification has really explained little or nothing at all. It seems that nobody yet understands what you are describing. It seems that either you can't or won't explain the concept clearly.

Several people have expressed interest in seeing a demo which should help seeing what this does and how it works. However, you seem totally unwilling to do this. As a result, more than one experienced developer has now given up on the thread.

Your screenshots provide little in the way of clarification either.

Surely, if this is such a great idea that you hope others will take up, you would want to make every effort to help them do so.
Why are you so resistant to doing so?
Thanks to your questions, I have - finally - got the opportunity to clarify a little more what this concept means.
I really wish that were the case!
 
We're not as dumb as you think we are and we have listened. All you are doing is bragging about how wonderful and flexible your solution is. Show us a form and the code that makes it so wonderful and the tables the code uses to control everything.
No Pat,
I don't think in that terms, it is nor my style. There are differences, though, because our references are different. For me from the dynamical approach, for you from the standard Access approach.
I use words like "flexible" or even "extreem flexible", but not words like "wonderful" of "ethereal", and that kind of flattering terms. These are all invented here in the forum.
You keep saying that you have a single form. Well, the form images you posted don't bear any resemblance to each other so does that mean that each time you open a form, you look up some data in a table and figure out what controls it needs and place them neatly on the form in some rational configuration which is defined by the table. Nothing you have described relates to what you are showing in the pictures.
Mostly right. It is configured in relation how the user can easily understand what he was looking for.
The example was to show how one can retrieve the correct value of a postcode, from uncertain information about the cityname and the streetname. And this was one of the results. Nothing to do with the general concept, only showing that working without cascaded listboxen is also a possibility with dynamical forms/applications.
The form that shows the post code list seems to include a subform but there is no navigation control so have you just created a matrix of controls and put 11 instances on the form? What if you need more? How do you get to the next page?
There is one dummy form for continuous records, and one dummy form for all the rest. Both are unbound.
The functional part of the rest-form is 20 identical subforms, with each 66 anonymous hidden controls. The numbers have evolved in some way. I have the choice between modifying the current form on the spotto display the retrieved record, or open an additional continuous form. For the systematics it makes no difference, because I can "spoil" forms as long as there is memory capacity. It is not a mathematical matrix.
In unbound forms there is no navigation control. You can click on it select.
When there are more "records" than the screen height can display, the form is enlarged to accomodate all records, and a scroll bar is displayed.
With large number of records you can switch to a next form that displays the data divided over more columns.
And finally, you can always ask the user to make a sharper criterion. In general that is always the best.

By the way, and I think that is the most important part: each control, anywhere in the application, refers to a specific record in the metadata table, that describes the control "all-in" from the user/design view, including where and how to retrieve and store its value.

Thank for listening.

Imb.
 
My original admonition in your introductory comments still applies. If you have something to sell, this is not a marketplace of products. It is a marketplace of ideas. Your explanation of your ideas remains a bit thin in substance.

Let me take a different approach. If you have something to sell, I understand that you would not want to "show your hand" without contractual protection, a non-disclosure agreement or something like that. However, at the moment you sound more like a marketeer than a software engineer. Are you actually planning to sell this "thing" you have developed as a product on the open market? Do you plan to continue developing closed "turn-key" systems where the overall system is the product but using your methods to more rapidly implement?

I understand if you are reluctant to show more of what you've got because you are trying to protect your investment. I am the same way about my novels. (Still on-and-off trying to find a publisher.) So... are you trying to balance this discussion against your fear to publish details?

Here is the fly in the ointment: You have now described a wondrous method/product to a bunch of technical skeptics who have, collectively among them, a few HUNDRED years of experience in projects. If you include my pre-Access projects using other development environments, I have maybe forty years of directed projects including both base product development and specifically targeted projects built to a customer's specifications. Multiply that by a few dozen members and realize that you are dealing with folks who have already dealt with customer reality a lot. You aren't really "wowing" the audience. The crowd is getting unruly.

Understand, we respect your need to protect YOUR product. But in a way, when we remain skeptical of your claims and call you down on things you have said, WE are protecting OUR product, which is the Access World Forum as a place where people can get decent help with their problems. As part of our method of protection, we feel it is in our best interest to interrogate and challenge people trying to push some product of unknown quality and effectiveness. Which, at the moment, includes whatever it is that you have been talking about in the last 50 posts.
 
Now a more specific comment: In your post #54 you talk about dynamic configuration. Do you have a bunch of pre-defined but hidden controls or do you create your controls when you (or your code) configures a form? Because there is this little "gotcha" that Access has a life-time limit on the number of controls that can be created on a form. Dynamic control creation would seem likely to run into that limit quickly after several days of use, so you have to have a bunch of hidden, re-usable controls - or else you dynamically create and drop forms to reset their capacity. Which implies, for Access as a platform, frequent Compact & Repair requirements.

The reason I remain seriously skeptical is because a corporation the size of ORACLE, after they bought out PEOPLESOFT, was unable to generalize the U.S. Navy's personnel management system using their "library" of pre-defined data types. They had to resort to "PEOPLECODE" to do a lot of what they claimed they could do, and the problem with PEOPLECODE was that they claimed it wasn't code, it was data. Except that it really looked like code to me. But what did I know? I was only a PhD with experience in several different disciplines and an analytical mind, watching the train wreck that it turned out to be.

The inherent flaw (so far) in ALL systems that claim some special dynamic reconfiguration ability is the injection of the unknown or unusual, with a customer who ABSOLUTELY refuses to let "the tail wag the dog." The Navy would not allow PEOPLESOFT to say, "Well, maybe you should change the way you do business." Heck, it takes an act of Congress (in some cases quite literally) to change even the most minor procedure. This led to an innumerable list of customizations that cost more than the base product.

When the Dept. of Defense tried to use PEOPLESOFT for their ill-fated DIMHRS project (you can look it up in Wikipedia), there was no uniformity of personnel management among the (then) five branches of the military - AND it was worse for each branch's reserve component. For instance, U.S. Navy Reserve sailors are under contract; they are not treated the same way as Army Reserve or Marine Corps Reserve. Therefore, there was no path of reconciliation to get it all into a single database. The project's internal overhead and the repeated failure of the servers to be able to process 24 hours worth of transactions in under 24 hours of run time eventually killed the project.
 
Similarly, each additional usage becomes increasingly complex and difficult to troubleshoot. Eventually, I reached a point where it was taking up more time to maintain than the amount of time it was saving and called a halt.
@Imb this statement ☝️has a lot of significance. I DO NOT want to discourage you at all in achieving your goals but when I was younger and started out development I too wanted to create a well rounded database solution to fit any and all needs. The problem is that every time I implemented something an new need would arise and I have to go back to the drawing board to make 'updates'.

After years in the corporate environment I realized that getting dynamic and reusable objects to work requires a lot of time to maintain. For example take Sage. It is one of the best accounting software out there and it suits almost all business needs but it still have limitations, it is not good at visualizing data. Someone would have to extract the data into Excel or Power BI to make a proper presentation.

What I am getting at is Sage is a company with about 1000 employees working together to make the software work and taking on a project like this needs people collaborating but in order to collaborate well and bounce ideas of one another, a working or somewhat working template is needed to make the necessary suggestions to move the project forward.
 
Last edited:
@Imb
I think I understand what you're doing. Basically, your framework lets you write the control definitions to a table and after that everything is handled by the forms.

So, what is the source object of the 20 subform controls? Is it the same form or different forms?
How does the control definitions look?

Sounds like a clever way to deploy applications for those that don't have strict specifications. So it's good.
 
  • Like
Reactions: Imb
This "lmb" person distinctly reminds me of someone - but I can't remember the name - who got banned from UA for going on and on ad nauseum using a lot of words without really saying anything and arguing with members. Just the tone seems very familiar, and the going on and on with pages of writing and at the end having said nothing. If I remember the handle I'll post.
 
Quote from post #1:
Now finally my question. I am looking for developpers that work in the same area, to share ideas, and to improve the whole process, or articles that cover the same approach.
I don't know why some posts talk about advertising for the marketing of a framework. From the quote above, I understand that you want to share ideas about the design. Am I wrong about this?

As already written in #36, I also use forms from time to time that provide (show) dynamically required controls. However, these forms always have a specific task for me, they just look different or have different control source. Example: Attributes of an article that are different depending on the article group (different names, look-up data, etc.).
If I want to react to an event for an attribute, I intercept this in the form and use the attribute code to check whether something should be done.

Code:
Private Sub txtAttributeValueTxt_GotFocus()
 
   Dim AttributeCode As String
   Dim ...
 
   AttributeCode = Me!fiAttributeCode.Value

   If AttributeCode = "ProductionLock" Then
       ' (open dialog form to select lock state, description, ...)
       ....
   ElseIf ....
This is sufficient for my case, as the number of attributes is manageable.
This would be nothing for a generally usable form.
How do you design this in your form?
 
Last edited:
Quote from post #1:

I don't know why some posts talk about advertising for the marketing of a framework. From the quote above, I understand that you want to share ideas about the design. Am I wrong about this?
Hi Josef,

You are absolutely right! That is the only point.

I agree that a video would have clarified a lot, but I have no expertise to make video.
And publishing an example database: the most important part is the generalized code to make it dynamical.
You must have quite an experience in reverse engineering, to understand how it works.

In a few moments I start an answer to another post, a post without all those cumulated emotions. Perhaps that is also interesting for you.

Have a nice day, Imb.
 
Last edited:
I hate to say, but you TOTALLY MISSED the concept, only ventilating your own ideas.

Imb.
 
I would have started this thread/concept with the smallest idea of creating a single multipurpose form with a little metadata to customize it at runtime. This would have been easier to conceptualize and digest. Most of us have done something like this (as evidenced from many posts) and would follow the logic. The idea could have been slowly developed with an explanation of the ERD of the metadata and snippets of code.

Instead we got
1736436967483.png
 
So, what is the source object of the 20 subform controls? Is it the same form or different forms?
How does the control definitions look?

Sounds like a clever way to deploy applications for those that don't have strict specifications. So it's good.
Hi Edgar_,

Your question points to the right spot for one of the findamentals of this approach.
I will try to explain this as simple as possible. So I will drop for the moment all kind of accompaning remarks.

I have ONE flexible form to make a multitude of representations, on the spot. In fact there are two, one for the continuos case, and one for all the rest. Within my concept that makes no difference, because it is the Control that is important, and the form is just a carrier.

You referred to the form with the subform control, and I will handle that, let us call it the "Mainform".
This Mainform has 20 subform control. The number 20 is just arbitrairely. I use these subforms more or less to create columns in the representation. Each subform control can be loaded with the same "Subform", if necessary. This subform carries 66 (grown through evolution) Textbox controls, without any definition.

Before I continu I have to say the each field in each table/item/identity has a record in a metadata table, the "A_Veld_tbl", with the specification how each field-representation on the form, thus each control, should behave.
When you open a dynamical form, you must give it a name, e.g. "Person". the generalized code searchs for a sub named "Person_Open". In this sub is specified what you want to see on the form. A couple of these result is already shown somewhere in this thread.
In this sub I define where the control is placed, and specified which function it will have: representing a field in an Item, or be a Label, Commandbutton, ... If it is a Textbox, an Item and Fieldname are defined, and searched in the A_veld_tbl to catch the A_veld_id. This A_Veld_id is tagged in the control. With ths t you can retrieve the value and display it in the control. I do this for every necessary Subform.
Then the form is displayed. The form itself is not important anymore, but the Control and its Tag.

How the form is reorganised afterwards is not important, as long as the control keeps its tag. But nothing prohibits to change the tag, but that is out of scope on this moment.

Now how work the controls.

Whenever you Enter a control, its Tag identifies which A_Veld_rec must be opened, to have all the attributes for this control, but also the initial value is stored. On Exit, you can immediately identify the "Dirty" state.

In related metadata tables is described all details about validation the data in the control, and actions after changing the value of the control. All these steps are only performd if the control-value has changed.
Depending on preferences, the you can store the new value or not.

How to react after entering, clicking, dblclicking, ... is described in the general code.
If things are application dependant, the program flow is passed on to local subs, named e.g. "Person_Click".
All what is necassary are metadata-tables, shared general code, and if necessary, local code in a general module.

I hope this base-information helps you in understanding the concept.

Imb.
 
When you open a dynamical form, you must give it a name, e.g. "Person". the generalized code searchs for a sub named "Person_Open". In this sub is specified what you want to see on the form.
What sort of sub are you talking about? a sub routine, a sub form?
In this sub I define where the control is placed, and specified which function it will have: representing a field in an Item, or be a Label, Commandbutton, ... If it is a Textbox, an Item and Fieldname are defined, and searched in the A_veld_tbl to catch the A_veld_id. This A_Veld_id is tagged in the control. With ths t you can retrieve the value and display it in the control. I do this for every necessary Subform.
What do you mean by item here? Also, I prefer to see how the metadata looks in your Access file, can you take a screenshot or paste here a few examples of the whole definition that will be processed by your code? It's really hard to see what you're doing with just that. I understand you're using those keywords in the tag, but where are they defined? a table record? then how does that record look?

All what is necassary are metadata-tables, shared general code, and if necessary, local code in a general module.
Okay, it is a table. How does that actually look?

Here's the problem we are having. When you make a framework that you want others to use, feel inspired by, sell, whatever, we need to know what that framework is going to require us to do and see the output. Take a look at this:
As you can see, it goes straight to the point: your code will look like this, and this is what you'll get. Period.

Nobody in a hurry is going to go check the code that is powering it, we just want to see what we will do and the result. Once we have seen results, THEN we can analyze it further in order to expand it or whatever.
 

Users who are viewing this thread

Back
Top Bottom