473,325 Members | 2,342 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Allow user to add a field.

135 100+
What is the best method to allow the end user to be able to add a field? Is there anyway to have a button or something on the form that would allow the user to create a new field without the user having to mess with the design?
Nov 20 '09 #1
5 2301
missinglinq
3,532 Expert 2GB
Users don't add fields in Access databases, they add records!

Users add fields in spreadsheets, such as Excel.

Perhaps if you can give us some idea of exactly what you're trying to do here, and why you think you need this capability in a database, we can help you.

Linq ;0)>
Nov 20 '09 #2
Stewart Ross
2,545 Expert Mod 2GB
I can think of many reasons why users should not be adding fields to tables at all, and no circumstances in which it is a good thing - perhaps you can let us know why you need this particular option?

It is possible to change table structures under program control, by changing the underlying TableDef contents, but even if you did how would your users enter data? You'd need to bind the new field to a form control, and as forms are normally bound to queries (not directly to a table) this not only means changing the design of the form to bind a new control it means changing the query design as well.

Perhaps you could tell us more about what this one is about, so we can look at ways to do this that do not involve adding fields to a table under program control...

-Stewart

PS apologies for cross-posting Linq - glad to see I'm replying along the same lines as you!
Nov 20 '09 #3
MyWaterloo
135 100+
You answered my question. I am making a database that will contain information on municipal systems in my area. The problem with this database is not knowing exactly what fields will be needed. For example: currently the idea is for the information to include only address, location, municipality, type of municipal building, phone etc. and staff at that location. I am just trying to find a way to future proof without having to redesign or add fields later. I can come up with at least three more fields that could be useful, but are not currently in use. As I was thinking through my database I was pondering the possibility of a field being added by the user... has it ever been done?... how would one do such a thing?... is it worth it? In a table there is a "add new field" column. I didn't know if it was possible to bring this all the way through to a form. Have a "add new field" control on the form. Thanks.
Nov 20 '09 #4
ajalwaysus
266 Expert 100+
@MyWaterloo
I would have to concur with Stewart and Linq, this is not a good idea for multiple reasons, mainly, users usually have very little regard for database normalization and design, so they are more likely to make your database a design nightmare instead of making it easier on you.
Besides, no offense, but designing and redesigning a DB is the DBA's job, I work at a place that in the past they allowed "users" to design their own fields and even entire tables, we now have a table with 157 million records in it and ZERO indexes, for those who understand databases, that ain't good.

I hope you decide to keep this job in your hands, besides, it's job security =)

-AJ
Nov 20 '09 #5
NeoPa
32,556 Expert Mod 16PB
@ajalwaysus
You don't need to tell us AJ. It's those others that don't understand that need telling :D

I clearly don't need to add my two-pennorth here. This is just a bad idea.
Nov 22 '09 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Danny | last post by:
How to allow users to select a set of records and then let them change a field for all these records at once? I would like to do this in code on a form. I will have a form with tabular view of...
2
by: Danny | last post by:
How to allow users to select a set of records and then let them change a field for all these records at once? I would like to do this in code on a form. I will have a form with tabular view of...
6
by: Cro | last post by:
Dear Access Developers, The 'Allow Additions' property of my form is causing unexpected results. I am developing a form that has its 'Default View' property set to 'Continuous Forms' and am...
1
by: ekariuki | last post by:
Hallo, I have a table Routes that contains a route name and when the route runs. I would like to calculate the difference between the last run Day and the one after it. This will populate in the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.