Adding New Data To Existing Table

Mar 27, 2007

Please bear with me, first post, trying to get to grips with Access for work!

We (a primary school) had a "bespoke" database set up using MS Access by someone who has long left the area and now we need to make changes and I, as the most computer literate person on site, have been volunteered to make these changes.

My level is beginner (for now) and my first job is to add some new options to a "Titles" table, four columns, six records. Column1 = ID#, Column2 = Male Titles, Column3 = Female Titles, whilst Column4 seems to hold items from Columns 2 & 3.

If I add a futher option, I get the error "Can't perform cascading operation: Entry must be one of the Titles as featured in the drop-down box or in the Titles table.

Now, as far as I can tell, I HAVE added the new option to the Titles table, and they DO show in the drop down box in the main spreadsheet display, BUT the error comes back as soon as I try to confirm the new title.

Any ideas please?

View Replies


ADVERTISEMENT

Adding MR. Or MRS. To Existing Field Data

Jan 24, 2007

Hi.
I have a table with a NAME field and a GENDER field.

How would I code a query so that if the gender is MALE than MR. would be added to the front of the existing data in the NAME field? MRS. if gender is FEMALE?

i.e., the result would be MR. SMITH, MR. JONES, MRS. CARSON...

Russ

View 4 Replies View Related

Forms - Adding Query As Data Source In Existing Form?

Dec 2, 2012

I am trying to add a query in an existing form. When I click on adding a field, I get an option to show "all tables" for not queries.

View 3 Replies View Related

Tables :: Adding Records To Existing Table

May 19, 2014

What I have is a database that I have done some tweaking on and in the meantime the original db has been in use which has added around 200 or so more records in the table.

What I would like to do is to just update the db that I have been working on with the older db table(the one who has the additional 200 records).

EX. DB A(Old DB, Newer Table) DB B(New DB, Older Table)

I want to put DB A table into DB B

Is this a simple fix? Or do I need to write some sort of query to update the records in the old table? I've tried to export the excel file and then import but it puts it in unrelated objects and then my switchboard or nothing works.

View 9 Replies View Related

Tables :: Adding Many To Many Relationships To Existing Table

Sep 13, 2012

I have 3 tables

tblProductInfo
- ProductID
- ProductItemNumber
- JDEDescription

tblFacility
- FacilityID
- FacilityDescription

tblProductFacilityMM
- ProductToFacilityID
- ProductIDFK (combined with FacilityIDFK to make a PK)
- FacilityIDFK

As I'm writing this out, I am realizing that tlbProductFacilityMM.producttoFacilityID is probably not necessary, but that I don't expect that to have much significance to the issue. So I've setup a query between the two tables:

Code:
SELECT tblProductInfo.ProductID, tblProductInfo.ItemNumber, tblProductInfo.JDEDescription, tblProductFacilityMM.FacilityIDFK, tblFacility.FacilityDescription
FROM tblFacility INNER JOIN (tblProductInfo INNER JOIN tblProductFacilityMM ON tblProductInfo.ProductID = tblProductFacilityMM.ProductIDFK) ON tblFacility.FacilityID = tblProductFacilityMM.FacilityIDFK;

And used it to create my subform which is simply a drop down box for tblProductFacilityMM.FacilityIDFK. My main form is one that has already been in use for 6 months or so, it is based off the tblproductinfo table and needs to have the option to select multiple Facilities for each ProductID. I inserted the subform, but when I try to select a facility I get an error that reads:

Quote: Cannot Join Records; Join key of tblProductFacilityMM not in recordset.

View 2 Replies View Related

Adding AutoNumber As Primary ID To Existing Table

Jan 31, 2012

I have a simple database that I inherited, that contains basic customer contact info. We want to start adding more functionality to the database, so I've done alot of research to learn about how to begin normalizing my data.The existing table does not contain a useful primary key, since we may have multiple individuals from the same company, companies with very similar names, etc.

I would like to add an AutoNumbered field to use as a CustomerID/primary key, but I can't seem to find a way to do so. Here is what I've tried so far:

I have tried to add a field to the table, and make it an AutoNumber data type. When I do so, I can error message saying that I cannot make a field AutoNumber if any other field in the table already has data entered in it.I have tried to create a new table containing only an AutoNumber PrimaryID field, and then import data from the existing table, but that just creates a 3rd table.

View 1 Replies View Related

Adding Columns To Existing Access 2003 Table

Jun 3, 2005

Hi,
I am fairly new to doing DBA, and I am having trouble adding a new column to a table that is existing. Is there any simple way to do this or does it have to be done throught code? And if so how.
Thanks
zorter8

View 1 Replies View Related

Adding A Prefix To Existing Description In Project Table

Apr 17, 2012

How to add a prefix to an existing description in a project table, generated from the project number. Here's a sample of my data:

PROJECT NUMBER DESCRIPTION
01200000 Completed Projects
01601530 Steele Sub

I would like the Descriptions to read:
01200000 MO-20 Completed Projects
01601530 MO-60 Steele Sub

The state, "MO," comes from the first two digits "01" and the coop, "60," comes from the second two digits. I have a table of a thousand or so projects in an Access database that I need to amend the descriptions of to include these prefixes. Is there a simple way to do this in Access or in Excel without writing code?

View 1 Replies View Related

Adding New Field To Existing Table And Form - Getting Error

Jun 8, 2014

I'm trying to add a combo box field to an existing table and form. I added the new field to my existing table and set it up as an combo box added my row sources. Then added the new field to an existing form and now am getting a error stating "The record source "Table name and added field here" specified on this form or report does not exist. When I just make the new field a text box instead of combo box it works just fine.

View 2 Replies View Related

Add New Field To Existing Table And Populate New Field With Existing Data

Apr 23, 2014

-Microsoft Access 2010

-Existing Access Database contains tables with 1-2 million records

I would like to add a field[dol] to an existing table[rei]. I need this new field[rei].[dol] to be populated with existing data from another table[main] based on the associated field[main].[account1] or [main].[account2] or [main].[account3].

Table1[main]
...account1
...account2
...account3
...dol

[code]...

In the [main] table. There is always data in [dol]. But there is NOT always data in the [account] fields. Sometimes there is multiple account numbers per [dol] but not always.

Customers will ALWAYS have at least 1 [account] number and [dol]. Some will have multiple [account] numbers and [dol]. Sometimes these [account] numbers are the same in multiple fields[account1] [account2] [account3].I just need to do a lookup or something to find the [account#] and pull in its [dol] from the [main] table and populate it in [rei].[dol].

View 14 Replies View Related

Setting Data Import To Overwrite Data On An Existing Table

Aug 1, 2007

I have a database that I import data from an excel spreadsheet into multiple times daily. The table that this data is imported into has several key fields that if the data already exisits in the table, and I attempt to import data that is the same except for one or more of the key fields is different. At this time the database it creates a different record. I am trying to get the database to overwrite the data in the database.

View 1 Replies View Related

General :: Possible To Have Data From Linked Table Automatically Update Into Existing Table?

Aug 17, 2012

I have one DB that is used for creating/storing customer ID's, and another DB that is used for creating/storing job information for customers.I have linked the table from the customer DB to the job DB.

There is a table in the job database that holds customer name and ID, and some VBA that generates unique job codes.

Is it possible to have the data from the linked table automatically update into the existing table?

View 1 Replies View Related

Tables :: Normalize Existing Table Containing Data And Copying PK Value To FK In New Table

Nov 21, 2014

I am working from an existing database which is just two table. The main table has a massive amount of redundancy and duplication and needs splitting into, at first glance, 5 tables.

After I have run my various make table queries and added a Primary Key and FK field to the new tables how do I populate the FK with the Parent PK.

I thought I could simply add all the fields from the new table and then create an adhoc join in an update query to populate the PK to the FK. When I do this however I get "You are about to update 0 records"

I have tried the table analyzer but it doesn't give the correct options to split the table the way I need.

View 6 Replies View Related

How Do I Append To An Existing Table Without Overwriting Data

Feb 3, 2005

Hi,

I have a table that contains a notes field. What i would like to do is to append to this field in table with some more data (notes), however i dont want to over write the existing data. I would just like to add to it.

the current notes are added through the access front end, but in this instance i have a particular note that needs to be added to various enteries without overwriting existing data. I know this is to be done via an append query, any help would be great

Thanks

View 14 Replies View Related

Forms :: Add Field Data To Existing Table Row?

Dec 21, 2014

I have a form (frmCompany) which has two combo boxes (cmbCompany and cmbCity) which is used to add field data into a table (tblCompany). The Company field is the only required field the other is optional.

In some cases I may wish to add a City, at a later date, to an existing Company using frmCompany. I now select the company from the cmbCompany combo box then add the city to cmbCity. The problem is that when I close the form I get two companies in the table with same name, one has a city and one does not.

How can I add a new City to an existing Company, using the form, without adding a new Company?

View 9 Replies View Related

How Do I Inject/dump The Data From A Recordset Into An Existing Table Via VBA?

Nov 13, 2004

Say I have a table [tbl1] and a recordset [rst1].
The fields in both items are the same. Now, how do I copy/dump/inject (what's the correct term?) the data from the recordset into the table?

View 3 Replies View Related

Update/Change Existing Data To New Table With Query?

Feb 17, 2008

i'm a Access novice. I have tables with existing data in numerical form, and would like to know how I can use Queries or VBA code to update these values into a new format in a new table. for example the original data might be of race type:

1 - caucasian
2 - african american
3 - hispanic 1
4 - hispanic 2
5 - hispanic 3
6 - other

and i want to regroup these into less types, eg:

1 - caucasian
2 - african american
3 - hispanic
4 - other

how can i achieve this in Access? i know how i can do this conceptually with "if" and "case" statements, but I have no idea how i can do this in Access. I don't want to mess with the original data, so please help with CODE or QUERY examples.

thanks!!

View 4 Replies View Related

Modules & VBA :: Automate Importing Xml Data Into Existing Table

May 22, 2014

what is the best way to import the data from the XML file into an access database table. The database I am working with has one large main table where all of the main record data is stored. There is a somewhat complex string of queries and reports based off this table that I am concerned about preserving. The problem is that the XML file is not structured in the same way the table is. The headings are named different, aren't in the same order, etc. I cannot use the import method and simply append it to the main table.After much searching around I have found two options:

1) Use the built in XML import method that access provides to create a secondary table. Then find a way to take data from individual fields in the second table and map and insert it into a new record in the main table.I already have the import part of this option working. The only part I can't seem to understand is how to take data from the second table and get it into a new record in the main table under the correct headings

2) Read the data from the XML file all at once and then map and insert it into the main table.I have not attempted this yet. I was having a hard time understanding how to retrieve the data from the XML file in the first place.

So.. which would be better/easiest to automate (most likely via button click on a form)? I only have a small understanding of VBA and even less understanding of anything XML.

View 5 Replies View Related

Queries :: Data Validation Of A Field In Existing Table

Aug 13, 2015

I'm trying to write a query that will validate a field in an existing table. I want the query to show where any of the 412,000 records fail this strict validation:

AAnnnnnnA

...where A is any letter A-Z and n is a digit 0-9

Clearly I can use the LEN function to check for invalid lengths (anything <>9), but I'm looking for a simple neat expression I can use that will check the format. Does an existing function already exist before I resort to writing my own function in VBA (again)?

View 7 Replies View Related

Import Excel Data Into Existing Access Table With Foreign Key Fields

Apr 25, 2015

I used to import excel data into access successfully, many times but now I have to import excel data into an existing Access table with foreign key fields, which makes me problems.

Its just doesn't work...and Im sure the forien key fields are the prob cause, the other fields are going well ...

View 1 Replies View Related

How To Populate Data Field With Specific Date To Existing Table In Access 2010

Jun 14, 2013

I have a table with more than a million records. I want to add a new column with date equals to e.g.3/14/2012 for all the records. I am using update query, but it is super slow (taking more than a hour)..is there any other way to do this?

View 6 Replies View Related

Adding Columns To Pre-existing Databases?

Oct 6, 2005

I am a new MS Access user. I am having difficulty adding columns to a pre-existing database. Is there a simple way to do this?

View 4 Replies View Related

Help! Adding Propercase To Existing Code

Sep 28, 2005

Help!

I found this wonderful code and would like to add Proper Case upon save. Have tried several variations to no avail. Any help would be appreciated.


Private Sub cboDayshiftPatent_NotInList(NewData As String, Response As Integer)

On Error GoTo Err_ErrorHandler

' provide text constants to reduce text later and allow for faster execution
' due to added speed from the compilation of constants
Const Message1 = "The data you have entered is not in the current selection."
Const Message2 = "Would you like to add it?"
Const Title = "Unknown entry..."
Const NL = vbCrLf & vbCrLf

'connection and recordset object variables
Dim cn As Connection
Dim rs As ADODB.Recordset

' show message box and evaluate if the user has selected Yes or No
If MsgBox(Message1 & NL & Message2, vbQuestion + vbYesNo, Title) = vbYes Then
' open a connection to the connection object
Set cn = CurrentProject.Connection
' initialise the recordset object
Set rs = New ADODB.Recordset
' using the recordset object
With rs
.Open "lkupDPatent", cn, adOpenStatic, adLockPessimistic ' open it
.AddNew ' prepare to add a new record
.Fields("Dayshift") = NewData ' add unfound data into field
.Update ' update the table
.Close ' close the recordset connection
End With
Response = acDataErrAdded ' confirm record added
Else
Me.cboDayshiftPatent.Undo ' clear the entry in the combobox
Response = acDataErrContinue ' confirm the record is not allowed
End If

Exit_ErrorHandler:
' de-initialise our object variables
Set rs = Nothing
Set cn = Nothing
Exit Sub

Err_ErrorHandler:
' display error message and error number
MsgBox Err.Description, vbExclamation, "Error #" & Err.Number
Resume Exit_ErrorHandler

End Sub

View 1 Replies View Related

Adding New Element To Existing Database

Dec 8, 2011

I was tasked by my CFO yesterday to add a new element to my existing database. I will try to keep what I am trying to do simple.

Basically we do finance for multiple projects. each project has employers.

My database records these employers names, SSN, dates registered, program they are in, and a few other elements as well.

What I have been tasked to do is create a new table with the project managers in that table. this way in a query or report i can pull "sally sue's" projects or whoever I needed to. There are many PM's who have more than one project.

Here is what I have for relationships:

On the Project Managers table I have a PK for ID and then the PM Name as a second field. the ID field is linked to the Programs table which has a PM ID and Program name

The Program table is also related to the employer table which has all of the employers and their info. the relation between the two tables is the Program Name.

So when I run a query or report my goal is to be able to pick any project manager and get the associated count of employers under all of that projects managers programs. I have gotten errors when running queries. Perhaps I have the relationships set up wrong?

View 1 Replies View Related

Reports :: Adding Query To Existing Report?

Mar 15, 2014

Is it possible to add a query to an existing report? I use Access, not VBA.

View 1 Replies View Related

Forms :: Adding Subform To Existing Form

Apr 3, 2014

I'm having a bit of a problem with a database I'm trying to create, what I am trying to do is create a database to handle jobs in an IT workshop. The idea is that you generate the job card and then at the bottom you have a section to enter in the parts that are required for the job, and then have a report that prints out a list of all the parts required for all the jobs under a heading of the job card number.

The problem I am having is how to add this sub form / table to the job card sheet. I tried putting in a sub table, but that wont let me make additions to it, and I tried putting on a form but that wont retain more than one entry per job card (I have put it on continuous form).

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved