Full Version: Add New Record
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
CurlieQ1034
I have a cmdbutton that is to create a new record in a table with specific information. How would I go about doing that?
dannyseager
Various ways...

the simpliest would be to create an append query to do it.
dashiellx2000
I'm sorry, but a little more information is required. Where is the information that needs to be inserted coming from?
CurlieQ1034
It is coming from array variables.
CurlieQ1034
Let me explain a little more...

I have a record that I want to create 2 more records from, using a lot of the original record's info. I would like for my users to do it themselves, through a form...
dashiellx2000
Check out Fill Record w/Data from Prev. Record Automatically . It should get you started.

HTH.
CurlieQ1034
Ok, thanks William!
CurlieQ1034
I don't think that's what I'm looking for...

Any other suggestions?
ScottGem
One of the principles of relational databases is data should exist in ONE place only. Therefore, you should not be creating records with data from existing records. If the new records are in related tables, then all you need is a foreign key to relate back to the original record. If its in the same record, then you may have normalization issues.
CurlieQ1034
Let me explain further what I would like to do:

I have a piece of land, represented by one record; say it has 100 acres of land.
Well, a month later, we realize, the land needs to be split into 2 records, because it can broken down further. So, now we have two records, one with 75 acres, the other with 25 acres. Now, the original 100 acre record had percentages of ownership, PLUS it was linked to a certain lease... so instead of me having to manually go to each record, pull the percentages to the two new records, then delete it, I would like a form that interfaces with the user of the db... they tell it what tract needs to be split and pull data from the original tract....... dazed.gif
hvac
Use an Update Query to change the original record
i.e. Change 100 acres to 75 and change percentages
Then use an Append Query to Add new record(s) with new acreage with original record details and add percentages
You would not have to delete the original record and you could set up the calculations for percentage breakdown and number of tracks on your form
Just a thought...
CurlieQ1034
That sounds good... I'lll try that. Thanks Jeff!
hvac
Glad To Help....thumbup.gif

Sounds likes a nice little challenge..Good Luck
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.