adding field using form

saadtanvir93

New member
Local time
Today, 08:51
Joined
Sep 27, 2018
Messages
5
can someone tell me that
if i could add a new field in my existing database using a split form
 
ok i have an existing database table and i am making a software in access using forms
my requirnment is to add a new field in the database while the software is running
eg if i click a buttton in the split form it create an empty field in my database table.
 
Screenshot (50).jpg




in here i want a button which when pressed creates a new field which includes cheakbox in it
 
Looking at your form, you have a spreadsheet design with lots of similarly named fields Modification 1, Modification 2, Reference 1, Reference 2 etc.
This is not appropriate for a database and indicates the need for a fundamental table redesign.
So whilst it is possible to write code which will add fields to a table, I suspect that is going to add to the design issues you already have.
 
..
my requirnment is to add a new field in the database while the software is running
..
You can, but why?
The below code add a field with the name YourFieldName to the table YourTableName, the fieldtype is number.
Code:
CurrentDb.Execute "ALTER TABLE YourTableName ADD COLUMN YourFieldName Number;"
 

Users who are viewing this thread

Back
Top Bottom