Go Back   Access World Forums > Microsoft Access Discussion > Forms

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 04-28-2016, 01:22 AM   #1
jajambo
Newly Registered User
 
Join Date: Apr 2016
Posts: 4
Thanks: 6
Thanked 0 Times in 0 Posts
jajambo is on a distinguished road
Question Add Field in a table with a form... Possible?

Dear all,

Is it possible to add a field in a table by using a form?
I am working on a tracking database, where I track Machines as records and Modifications as fields. Both records and fields will grow over time and I want to create forms to update them.
Adding a record is obviously possible. But adding a field? I have no luck finding any answers yet.
Thanks for your time.

jajambo is offline   Reply With Quote
Old 04-28-2016, 01:35 AM   #2
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,432
Thanks: 165
Thanked 1,736 Times in 1,706 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: Add Field in a table with a form... Possible?

You shouldn't need to add a field if you are storing your data correctly. You should have a table of Modifications and add a record to it.
__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
The Following User Says Thank You to Minty For This Useful Post:
jajambo (04-28-2016)
Old 04-28-2016, 03:13 AM   #3
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,568
Thanks: 68
Thanked 2,744 Times in 2,629 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Add Field in a table with a form... Possible?

definitely doing the wrong thing. wrong design.
you are adding column for modification and/or machine?
table should grow by record not by columns.

__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
jajambo (04-28-2016)
Old 04-28-2016, 03:24 AM   #4
Isskint
Slowly Developing
 
Isskint's Avatar
 
Join Date: Apr 2012
Location: Wiltshire, UK
Posts: 1,301
Thanks: 124
Thanked 311 Times in 304 Posts
Isskint will become famous soon enough
Re: Add Field in a table with a form... Possible?

Ditto the 2 above and also consider queries, forms & reports. You would have to keep changing the designs to account for the new fields.

if mods can be applied to multiple machines
Table1: Machines
Table 2: Modifications
Table3: MachineMods

OR if mods are purely machine spedific

Table1: Machines
Table 2: Modifications
__________________
Isskint, i get satisfaction out of helping others
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


Success is the sum of small efforts, repeated day in and day out
Isskint is offline   Reply With Quote
The Following User Says Thank You to Isskint For This Useful Post:
jajambo (04-28-2016)
Old 04-28-2016, 04:47 AM   #5
jajambo
Newly Registered User
 
Join Date: Apr 2016
Posts: 4
Thanks: 6
Thanked 0 Times in 0 Posts
jajambo is on a distinguished road
Re: Add Field in a table with a form... Possible?

Thanks for the replies so far. To think about it, adding fields would NOT be a way to go.

To answer your question @arnelgp: both Machines and Modifications will grow over time.

@Isskint: Mods can be applied to multiple machines. What would Table3: MachineMods look like? I can picture Table1 and Table2, and they will have a "many-to-many" relationship.
jajambo is offline   Reply With Quote
Old 04-28-2016, 05:00 AM   #6
arnelgp
error reading drive A:
 
arnelgp's Avatar
 
Join Date: May 2009
Location: somewhere out there
Posts: 8,568
Thanks: 68
Thanked 2,744 Times in 2,629 Posts
arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice arnelgp is just really nice
Re: Add Field in a table with a form... Possible?

suggests basic structure of tables:

tblMachine
ID (Autonumber) (pk)
MachineDesc (Text)
' other fields here

tblModification:
ID (autonumber) (pk)
Description

tblMachMod (junction table)
ID (autonumber) (pk)
MachineID (long)(id from machine table) (fk)
ModID (long)(id from modification table) (fk)
ModDate (Date)

the records of table machine will grow row-wise.
the records of table modification will grow row-wise.
the records of junction table will grow row-wise.
__________________
"Never stop learning, because life never stops teaching"
arnelgp is offline   Reply With Quote
The Following User Says Thank You to arnelgp For This Useful Post:
jajambo (04-28-2016)
Old 04-28-2016, 05:02 AM   #7
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,432
Thanks: 165
Thanked 1,736 Times in 1,706 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: Add Field in a table with a form... Possible?

Table 3 is called a junction table and would simply have a UniqueID, then the MachinesID and the ModificationsID in it.
This allows you to have as many mods per machine as you require.
This is waht allows you to create your Many to Many relationship, which is not good/practical design.

__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
The Following User Says Thank You to Minty For This Useful Post:
jajambo (04-28-2016)
Old 04-28-2016, 05:30 AM   #8
jajambo
Newly Registered User
 
Join Date: Apr 2016
Posts: 4
Thanks: 6
Thanked 0 Times in 0 Posts
jajambo is on a distinguished road
Re: Add Field in a table with a form... Possible?

Quote:
Originally Posted by Minty View Post
Table 3 is called a junction table and would simply have a UniqueID, then the MachinesID and the ModificationsID in it.
This allows you to have as many mods per machine as you require.
This is waht allows you to create your Many to Many relationship, which is not good/practical design.
@Minty: What would be a better design?
jajambo is offline   Reply With Quote
Old 04-28-2016, 06:00 AM   #9
Minty
AWF VIP
 
Minty's Avatar
 
Join Date: Jul 2013
Location: UK - Wiltshire
Posts: 6,432
Thanks: 165
Thanked 1,736 Times in 1,706 Posts
Minty is a jewel in the rough Minty is a jewel in the rough Minty is a jewel in the rough
Re: Add Field in a table with a form... Possible?

Sorry - the junction table IS the good design - trying to have two tables directly joined by "Many to Many" was what I meant was poor / impossible design.

Try it on paper and you'll soon see why it can't work, you'll end up needing to add a field for every modification you could have again...
__________________
If we have helped please add to our reputation - click the scales symbol on the left, tick 'I approve' and leave a comment.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.


To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Minty is offline   Reply With Quote
The Following User Says Thank You to Minty For This Useful Post:
jajambo (04-28-2016)
Old 04-28-2016, 06:49 AM   #10
jajambo
Newly Registered User
 
Join Date: Apr 2016
Posts: 4
Thanks: 6
Thanked 0 Times in 0 Posts
jajambo is on a distinguished road
Re: Add Field in a table with a form... Possible?

Thanks to all!

jajambo is offline   Reply With Quote
Reply

Tags
add , field , form , table

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Form field/line visibility dependant on value selected in other field + table value peter2012 Forms 2 09-01-2013 03:41 AM
if query criteria, looking at form field return a null then look at field in table @stan Queries 16 06-11-2013 08:50 PM
Qry header table records based on form table field without duplicates brharrii Queries 8 02-12-2013 09:01 AM
Send a content of unbound field in a form to a field in the table CSCS Forms 3 09-25-2007 12:42 PM
Form Event (Before and After Update) Copy Form/Field value to Another Table/Field CUIUS Forms 2 08-18-2006 04:55 AM




All times are GMT -8. The time now is 06:33 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World