Microsoft Access
--
Questions
--
Followers
Top Experts
The app is split (front end and back end both Access 2010). Half a dozen of the tables in the back end contain fields that must be selected from a small number of fixed text values, so I've implemented some lookup tables (each with one text field, no autonumber ID). The lookup tables are currently in the back end. All data entry is via forms in the front end.
Would I be better off either (1) converting the lookup tables to have an number field as the key field or (2) moving the lookup tables to the frontend or (3) both?
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
2) Leave your Lookup tables in the BackEnd. Â Generally, the only tables that should be in the front-end are things like temp tables, or tables that are relevant only to the user of a given copy of a front-end. Â A good example is a Local Version table, which keeps track of the release version of front ends deployed to different users.
If they're in the frontend, and even one record change is required, you have to redistribute the app.
http://www.myaccessprogram.com/Tips_Best_Practices.html






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
 You can only enforce relationships within a DB container.
Jim.
Jim, frex I have a table tblTasks with fields fldStatus (which is validated against a lookup table) and fldResultSummary. Â If fldStatus = "Planned" or "In progress" than fldResultSummary must be Null. If flsStatus = "Complete" or "Recorded" then fldResultSummary must not be Null. With the lookup tables in the backend, this validation is coded as a table validation rule. if I move the lookup tables to the front end, I can still do that, but if the valid values for the lookup tables change, so might the validation rules, so would it be better to enforce them in VBA for frmTask (which is the data entry form for tblTask)?
 I've never been a fan of table level validation rules because they were too limited in the past.  As a result, I do everything in forms (or in other languages, in a business object), which is why you got the answer you got.
 Typically however I do keep my lookup table in the BE as it's a single lookup table that supports multiple types as I outlined.
 But there are "lookup" tables such as my menu system that I keep in the front end as the menus don't change unless the app changes.  I have others as well such as tblSystemEventTypes (app login/logout, form opened, task run, etc), which don't change unless the app changes.
 With all that said, there is really no right or wrong answer here.  It's what works for you and the situation you have.  I would say though that if you can get away with it (it's static) and still do everything you need to do, then it's better off in the FE for performance reasons.
Jim.

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
 I never checked into this, but I once had someone argue that a long was still faster on a 32 bit machine as it's a full register compare where as the single character of 8 bits would require register shifts before compares could be made.
 I've never dug quite that deep, so I don't know if that holds water or not.  But you certainly could pack more keys on an index page with a single character, which I think would far out weigh any performance gain you might get on a long through hardware.
Jim.
mx






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
It seems pretty obvious that I should definitely change the lookup tables to have an autonumber PK, for performance, since I don't have single character statuses.
The FE-BE decision is less clear-cut. I'd like to maintain the RI and the table-level validation in the backend - the only data validation code I have at present in the frontend is the stuff that can't be defined in the tables. If the lookup values change (which would only be to add statuses, in all probability) it won't be too onerous to code an upgrade routine for the backends (of which there will be many) -- there's already a version number field in a backend config table. So I'm leaning towards leaving the tables in the backend.
Whether to mirror the lookup tables between BE and FE? If it gives me a significant performance or reliability advantage, it might be worth doing... The application will be run primarily in a single-PC environment (both FE and BE on the same PC) but some users may choose to run it in a networked environment.
That will very likely be the case ... think about it ... Each time a user clicks on a drop down list ... not delay.
mx

Get a FREE t-shirt when you ask your first question.
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
Microsoft Access
--
Questions
--
Followers
Top Experts
Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.