How to get name of current field in table? (1 Viewer)

There is generic reference possible using ActiveControl but I have never used it as I find it unreliable. If you expect ActiveControl to be a textbox but just clicked a button then the button is active. So must be very careful using this method.

How are there multiple variations of this code? One procedure with 2 arguments is a generic construct.

Correct, your choice. It is a balancing act between normalization and ease of data entry/output. Normalize until it hurts, denormalize until it works.
 
All but one view expressed here is to use a second table for recording type of document (normalization). However, it's your database and you can choose to ignore that advice and have an inferior design.

Add a third table name DocumentType containing all the different types of qualifications. The existence of a qualification ID and document filename and path indicate a particular person has that qualification. It also lends itself to having a bit of code to loop through existing documents to populate that person qualification table (ie to give you the "names of the fields" that you sought in your OP).

It is then easy to query your data as to whom has qual A and (qual B or qual C) because it's normalized. Your proposed design will not make for easy query design because it will lack normalization.
 
I absolutely take the point of the hammer/screwdriver analogy but I think in this case it's a bit of a caricature given that (it seems to me) the single-table design will still be quite fit for purpose.

Wrong. You have probably already wasted more time trying to work around the problems of denormalized data than it would have taken to change it. If not you certainly will in time.

Your current structure is a dead end and you are wasting your time continuing on that path.
 
As for your position on why you would ever have a bunch of related tables rather than one flat file suggests that while you might be an absolute wizard at programming, that experience doesn't include relational databases or you wouldn't say that. To go into the whys and wherefores of this can be a deep subject that I don't have time for right now...

Hi Micron, sorry for expressing myself so badly, if that was the message I transmitted. What I meant was that this basic single table design is, I think, fit for purpose for this particular fairly simple and small-scale application.
I never was an absolute wizard at programming. Good enough, but definitely not a wizard - otherwise I might still be doing it ;-)
You're quite right that my practical experience doesn't include relational databases - when they emerged into the commercial mainstream, I was already done with coding. I continued working in IT for a long time though, and I subsequently did some academic study on relational data bases. So I do completely understand the imperative for normalisation.
 
If I came across as condescending, it wasn't meant that way. I gave you the benefit of the doubt when I said you might be a wiz in that area. It's just that I think others would agree when I say there's seldom any long term benefit to a flat file in Access. Short term, sure - less work. Long term, usually more trouble than necessary.
Anyway, hope you get or got a solution by now.
 

Users who are viewing this thread

Back
Top Bottom