Tables :: Updating Table Data From External Db?

Dec 24, 2012

I have an Access db in a 3 person multi-user environment on a Windows network.

There is a "PRODUCTION" db and a "DEVELOPMENT" db.

Let's call them PROD and DEV.

PROD has the most current data, shipping records, item master, customer data, sales, etc. - but not the most current structure.

DEV has the most current struture - all the front end stuff - forms, functions, modules, etc. - but not the most current data.

The way I've handled this in the past (it seemed to work) was to take the PROD db and rename it to PRODX. Then take the DEV db and rename it PROD. Then open DEV (now called PROD) using the usual shortcut to PROD.

So now that opens fine, and I have to update all the tables from PRODX - and I mean ALL of them - since I don't really know what data has changed since the last update.If I try to delete records I get blocked by access because of all the related records (I don't have cascade delete set on every relationship). So I delete the whole table - ALL of them (this requires me to also delete the relationships). Then I IMPORT all the tables from PRODX (these have the current data). But now the relationships are all gone. It seemed at first that the relationships were back and intact - but when I last looked they were gone. So this is my problem.

HOW do I COMPLETELY empty ALL of the tables - or even delete them - and then restore them or repopulate them from an exact copy of the db but with current table data - and WITHOUT affecting the relationships?

Obviously any back end structural changes have to be handled differently. Usually by manually making the same change on the PROD db that I had in the DEV db - because deleting the table will cause the structural changes to be lost.

One last thing - I've been working this way on an un-split db, and now I'm in the process of splitting it - which SHOULD make updates much easier.

View Replies


ADVERTISEMENT

Updating Table From External Source

Sep 10, 2007

Dear Forum,

I have a question and I would be very happy if you could help me with some thoughts on how to start.

I have a database, which contains one table tbX, which ist interesting in this context. tbX needs to be updated on a regular basis, hence it would be very helpful to automate this process.

Source is the table tbY, which is located in another database in a different directory. What I am looking for is basically a query (or do I need a macro?), which deletes tbX, imports tbY and changes its name to tbX.

As there is no macro recorder like in Excel I find it very difficult to find a start here... :confused:

I'd be happy for any suggestion.

Thank you.
Diana

View 3 Replies View Related

Tables :: Updating Table Data In Event Handler

Mar 11, 2013

I am working with MS Access. The database has 2 tables.

-Parent and Student and ParentID is the Primary key as a parent may have multiple Students
-There is a form that lets me add students for a particular parent

One of the fields in the Parent Table is FeeDue. I added a field in the Parent Table called NumOfStudents..What I want to do is as follows: When a student is added on the Student Form, I want fee to be calculated automatically for display AND update the FeeDue field in Parent table. Event handler executed when a student is added (checkbox clicked)

OnClick()
{
Read NumOfStudents from Parent Table

if(student_added = true)
NumOfStudents++
else /* This is to cover student withdrawl*/
NumOfStudents--

if(NUmOfStudents = 1)
Fee= 400
else
Fee = 500
}

student_added check box is on the student form NumOfStudents and FeeDue are fields in Parent

View 1 Replies View Related

Tables :: Adding Field To Table And Updating Data?

Dec 1, 2013

I have a table in my DB called, devices. This contains all the information about various devices we have deployed in the field.

These devices are also contained in 2 other separate MySQL DB's.

What I need to do is add 2 additional field to my access table for the DeviceRecno and DeviceID of the same device from the MySQL DB's.

Adding the field is easy, but I cant think of a way to enter the recno and ID from the other DB's without typing them in manually for each one.

The common between them all is the serial number of the device, and I can get a list of serial numbers, recno's and ID in an excel sheet.

like a vlookup in excel to easily populate all the existing records with the recno and id's from the other db's?

When I created the access system there was no intention to link it to the other DB's for any reason, but that has now changed due to a lot of reasons.

View 4 Replies View Related

Tables :: Access External Data Results In TMP Files

Oct 7, 2013

Running Office 365 (Access 2013). Recent problem occurrence. When I do an 'External Data' command, either from another Access database or an Excel file, the import completes, but I don't see the new table immediately in the navigator section. If I import from another Access database, the new imported tables appear as '~TMPCLP....' tables. If it's from an Excel workbook, the new table doesn't appear at all. It's only after I exit the database and reopen it do I see the new tables correctly named.

View 1 Replies View Related

Tables :: Import Table From External Database

Apr 23, 2013

Using access 2010. Trying to set up an import table from an external database.

Code:
DoCmd.TransferDatabase acImport, "Microsoft Access", "Y:DevTestFolder2013 01 Some Data Name", acTable, "tblName", "tblName"

I get an error 3024 could not find the file Y"DevTestFolder2013....

The database I am importing from is a 2003 .mdb. I tried the brackets because the file has spaces in it but still get the same error.

View 1 Replies View Related

Modules & VBA :: Exporting Tables - External Table Is Not In Expected Format

Sep 15, 2014

I'm currently using the following VBA to export all tables within my DB to Excel on separate tabs:

Dim td As DAO.TableDef, db As DAO.Database
Dim out_file As String
out_file = CurrentProject.Path & "" & "Backup.xls"
Set db = CurrentDb()
For Each td In db.TableDefs
If Left(td.Name, 4) = "MSys" Then
'We do not need MSys tables in excel file
Else
DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
td.Name, out_file, True, Replace(td.Name, "dbo_", "") 'We do not need dbo prefix in sheetnames
End If
Next

But upon exporting I get the following error:

"Run-time error 3274' External table is not in expected format"

It then hightlights the following line:

DoCmd.TransferSpreadsheet acExport, acSpreadsheetTypeExcel9, _
td.Name, out_file, True, Replace(td.Name, "dbo_", "")

If i navigate to the directory i can see that it has exported it to excel(attempted), but half of the tables(tabs) are missing.

View 1 Replies View Related

Modules & VBA :: Get Filtered / Grouped External Data Into MS Access Table

Oct 20, 2014

I have an Excel file with a name range "DBIAS" which identifies all database data.

Then I have an Access file with a form to import that database (better, that named range) into an Access table. While importing, I have to filter some records or grouping by some field.

I cannot run correctly a VBA code to get data (filtered and/or grouped) from that name range and save those records to an existing or a brand new table.

I could get those data as DAO.recordset and printed out with "Debug.print" on immediate window, but I cannot complete the final step: writing those records to a table.

View 3 Replies View Related

Updating Tables While Data Is Viewed

Apr 18, 2007

I have created a Production Tracking database for my company using
Access 2003. Everyone here uses Access 2000, so I have saved the file
as an access 2000 database. I am importing three tables from an ODBC
connection. These tables are being update by another department
constantly. I am using a centralized form for users to view the
information.

If the users are viewing the information and we try to update the
tables they are viewing, we get an error. My question is: Is there a
way around this problem?

This what I have done:
In the module I wrote, I am importing the tables, then renaming them
to the tables the users are viewing, and then altering the structure
of one of the tables. We cannot use linked tables, the reason is we
have only three licenses to access the software through the ODBC
connection. So as soon as three people open the access database they
take those three connections.

Any Ideas?

Thanks,
Phil

View 4 Replies View Related

Updating Split Data Tables

Oct 12, 2004

This has to be a common problem.

I have an environment where I have two databases. One holding tables (The Data) and one holding everything else "The Programs" (Forms, Queries etc)

When the application gets enhanced I currently have no problem updating "The Programs" since I can just copy the new MDB on top of the old MDB.

This is not the case with "The Data", if I need to change any of the tables (since they contain live data, that is modified all the time) I have to physically connect to the machine holding the Data.MDB and modify the tables. The problem is there are getting to be many locations where these changes need to be made.

Is there any way to update the tables from a script (I used to use SQL to update remote tables in a mainframe world)

Thanks

View 3 Replies View Related

Updating Data On 2 Tables Based On Criteria

Oct 8, 2004

Ok. Here's the situation. I have query setup. This query has 2 columns:
1. Agent Name
2. Sale Value

I have 2 tables.
Table1: Includes Sales for this pay period only
Table2: Includes all Sales From past to present.

We are setting up our system on Tiers and Each sale value is going to change. So, Here's what I need:
I need to run an update query that first Looks up all the records in Table1 based on Agent Name. The field that needs to be updated is called SaleValue. It needs to be updated with what's in my Query mentioned above.
Then, all the values in Table1, need to be copied (or updated) into Table2. This can be done based on the Primary Key (SaleID), which exists in both tables. So I guess we will need to run 2 separate update queries. Any ideas on how this can be done?

View 8 Replies View Related

Tables :: Updating One Column Of Data Across Many Records

Jul 9, 2014

I have a database containing 10,000+ trouble tickets identified by a unique field called "Ticket ID". This is the primary key for my table. (It's on just one table.) These tickets came from an excel sheet that was exported out of a different database. (For various reasons, we've moved the tickets to access.)

Among many descriptor fields, I have a field called "SPR Type" that shows what type of ticket each entry is. (Bug, Defect, Enhancement, etc, etc) The problem we have here is... not all of the ticket entries have an SPR Type listed on my access table because not all of the tickets coming out of the original excel sheet had one.

I was given a new excel sheet containing 400 to 500 ish Ticket IDs and the SPR Type that applies to each of those tickets. How can I take that sheet and use it to update my access table? Ie. Use the excel sheet containing Ticket ID and SPR Type to populate the blank SPR Type fields for each of their respective Ticket IDs?

**Update: I'm trying something like this...

UPDATE [SPR Priority] inner join [EB Update of SPR] on [SPR Priority.Ticket ID] = [EB Update of SPR.Ticket ID]
SET [SPR Priority.SPR Type] = [EB Update of SPR.SPR Type]

But I am getting an error that says "Invalid Bracketing of name [SPR Priority.Ticket ID] and similar errors. What am I getting wrong here?

I thought about an Update query that would populate the SPR Type fields based on Ticket IDs. I could import the new excel sheet into a separate access table and update from there.

View 2 Replies View Related

General :: Updating Table Data With Data From Preceding Entry?

Jan 5, 2013

My question is this: I have a table where I'm entering employees' hours worked. Basically, it's something like this:

ID WorkerNumberDateworkedTimeStartTimeEnded
121/2/201310:00:00 AM3:00:00 PM
221/3/20132:00:00 AM11:00:00 AM
321/4/201312:15:00 AM11:30:00 AM
421/5/201310:25:00 PM11:00:00 AM
531/2/201311:00:00 AM3:30:00 PM
631/3/201312:00:00 PM10:00:00 PM
731/10/20137:00:00 AM4:00:00 PM

I have a query that (easily) determines how many hours an employee has worked on any given day. What I can't figure out at all, is how to write a query that can figure out how much time an employee had off in between shifts.

Thus far I'm able to run a query that separates this main table into individual workers by their id numbers, but can't figure out how to determine time off between shifts - as the last hour worked one day, and the first hour worked the next day are on two different lines (they are two different table entries).

View 4 Replies View Related

Tables :: Related Table IDs Not Updating

Dec 3, 2012

I'm not sure why a couple tables are not being updated after entering data. I think my relationships are correct. I've attached the database.

steps:
open Main form
add addres then try to add an owner. it doesn't work the first time but it does work the second time. add test data and that works. now if you look at the related tables (OwnerInfo, WellLocation, TestData) they all have p_id which is the wellLocation Id

now open gernalinfo form
enter in info (tests requested doesn't work right now but you can click on them in the tbl GeneralInfo)
Now if you go to the table OwnerInfo and TestData the key p_id has not been updated. But it's there in WellLocation (ID).

Why are these tables not getting updated?

View 3 Replies View Related

Tables :: Updating A Table From Query

Feb 9, 2013

i want to update a field of the table from a field of query .

this is the syntax :

UPDATE tbl_PresentStockAll INNER JOIN qry_BroachStock ON tbl_PresentStockAll.ProductId = qry_BroachStock.ProductId SET tbl_PresentStockAll.Broach = [qry_BroachStock].[BalanceQuantity];

but i am getting error of "operation must use an updateable query".

View 8 Replies View Related

Tables :: Updating Records Between Two Table

Jan 22, 2014

I have this table "tblPreventativeMaintenance" which calculates when the next appointment for service. Stored in the field "NextDueService". I have three fields in this table. "SerialNumber", "NextDueService" & "Engineer'sReport".The whole purpose of the table above is to do the calculations.Now the results of the calculations I need them to go into another table "tblInstallations" so I can use it to show Next Due Service when there is a call out in regards to certain ready installed equipment. I have same fields in both tables.I tried update query but for some reason it didn't work or at least wasn't giving me the results I needed from it.

View 8 Replies View Related

Linked Tables Not Updating In Junction Table

Nov 20, 2004

Hi, I have the following structure:

Products 1-M ORDER DETAILS M-1 ORDERS M-1 CUSTOMERS

I have ORDER DETAILS set as a junction table so that many products can be recorded within one order. All is good apart from when i go into ORDERS and create a new order. I click the subform which links to the ORDERDETAILS. I then pick a product number(look up from products table). The problem is this: In the ORDER DETAILS I want to display the unit price of this product simply by picking the product id.

Eventually this would form the basis of an order form where I can pick Product Id and have it display unit price.

Any ideas on this one, I'm sure its quite simple!!

Thanks in advance

View 1 Replies View Related

Tables :: Updating A Table In Design View?

Jun 5, 2013

I have created a database table with 100+ fields with data. I now need to insert an additional 33 fields that will have a static default value between 1 and 33. I have already inserted the Line # field in the table between every 6 fields and gave it a default value. I now would like the existing database to update and reflect the new changes that were made for the new inserted fields.

View 1 Replies View Related

Updating Data In Table B Based Off Table A - Duplicates

May 19, 2013

I have two tables, Table Products & Table Sold and I'm trying to aggregate the products table to reduce the total number of products and I want this update to happen with all tables that share a 1 to many relationship with the product table. (table sold is one of those).I have products apple, pear, bananna. I am now aggregating them to all just be called fruit. Problem is when I make this change in the product table I get this error:

"The changes you requested to the table were no successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."how to go about aggregating data in a table that has 1 to many relationships with many other tables. A

View 2 Replies View Related

Updating Fields In Table With New Data - Help

Jun 17, 2007

Hello

I have a table with 3 fields:
- ID no (primany key), Time1 and Time2
I have 3 records with ID no 1 to 3.
So my table look like this

ID no: Time1: Time2:
1 [emty] [emty]
2 [emty] [emty]
3 [emty] [emty]

I have an Excel document with the data for field Time1 and another Excel dokument with the data for field Time2. Excel doc1 have 2 colums named ID no and Time1. And Excel doc2 have 2 colums named ID no and Time2.

How do I import/update these data into my table?

I have tried wiht a adding-quiry but it only works if the table is complety emty and only with one Excel doc. Trying the second Excel doc afterwards only makes an error and no fields are updated.:confused:

View 4 Replies View Related

Updating Table Data Using A Combo Box

Sep 4, 2006

Hi all
I have been nutting out this problem but have been unable to find a solution, even my learned colleague is at a loss to help. This is an data update query using combo boxes and forms.
I have 2 databases, Data and App, I have linked 2 tables, Main and Supervisor from the Data.mdb to the App.mdb. Supervisor has 2 fields ID and Name. Main has multiple fields but is linked to Supervisor by the ID field. I have a query that gets details from the Main Table and this is entered into a form. I deleted the SupervisorID text box and inserted a combo box using the wizard, it gets its data from a query that gets details from the Supervisor table showing the Supervisor name, the ID field in the dropdown is hidden. The combo box selection is held in the SupervisorID of the Main table.
What I want to do is change the Supervisor name using the combo box however I am unable to select another name from the dropdown list.
I have tried changing the Data Entry property of the form to Yes, this did not work. Allow edits is set to yes. I have tried adding another combo box which gets the data straight from the Supervisor table but I have the same problem.
Can anyone help, we think it is a simple property setting but all we have tried has failed to date. Thanks in advance.
Craig

View 4 Replies View Related

Modules & VBA :: Updating Table With New Data Value

Aug 11, 2015

I have a VBA script that looks at a date on a form, adds a certain number of months (selected by the user). at the moment i can output the new data to a message box. I want to update a table with the new data value.

This is the code i have so far.

mySQL = "UPDATE job master file " & _
"SET [BBDate] = " & newdate & _
"WHERE [job name] = " & strname

View 10 Replies View Related

Trouble Updating Parent Tables With Child Table/form

Jul 6, 2006

Sorry this is so long but I am trying to make it as detailed as possible...

The Setup

My database is similar to the sample "Service Call" db. I have a main table called "tblTT" which has an autonumber primary key. The table also contains several foreign keys such as UserID (not an autonumber) from "tblUser", TechID (also not an autonumber) from "tblTech", etc. I have the relationships setup with "Enforced Referential Integrity" for both updating and deleting records. Each relationship has a RIGHT OUTER JOIN ("Join 3" in access) so that all records from child (tblTT) and only equal from parent (tblUser, tblTech, etc.) will be included. I have a form for nearly every table which serves different purposes but the main function of the DB is to create new Trouble Tickets (TT's), a.k.a. service calls. Therefore the main form used is my "frmTT" form in add mode. The form contains all the fields from my "tblTT" table and contains (directly) no fields from any other table (I guess indirectly it contains fields from all the parent tables...).

The Problem

When I pull up "frmTT" and try to create a new Trouble Ticket for a user that does not yet exist in the table "tblUser" I get the error "You cannot add or change a record bcause a related record is required in table 'tblUser'".

What I want is for my users (the "Techs") to be able to create a new Trouble Ticket without having to worry about populating the "tblUser" table (and other parent tables) first.

My Solution

I was going to (and unless someone can find an answer for me still will) fix this using VB script by setting up a query to check all the parent tables for the values in their corresponding fields in the form. If the query returns no results an "INSERT INTO" statement will run to populate the parents tables so that the form will save itself into the Trouble Ticket table ("tblTT").

I feel that this is a huge work around and not the proper fix. I would prefer to do this the right way both to have a correctly setup DB and for future reference. Can anyone help me with this?


Thanks,
Andy

View 3 Replies View Related

Tables :: Updating Specific Records In A Table Using Sql Doesn't Work

Sep 15, 2014

I Have a table that contains the fields: CAT, CHAPTER, ID, someSrting and Completed

CAT, CHAPTER, ID are numbers and Completed is true/false. If I mark a certain entry as Complted (true), I want all the records with the same (CAT, CHAPTER, ID) as the one I marked to be updated to Completed.

For example, If I marked the entry cat:1 chapter:1 id:1 as completed (true), I want all the entrys that have cat:1 chapter:1 id:1 to be marked as completed (true)

the code I wrote is:

Code:
Private Pub Completed_check_AfterUpdate()
Dim myCC
Dim myCat
Dim myChap
Dim myID
myCC = Me.Completed_check
myCat = Me.CAT
myChap = Me.CHAPTER
myID = Me.ID
CurrentDb.Execute "Update [my Table] " _
& "SET Completed = (" & myCC & ") " _
& "WHERE CAT = (" & myCat & ") And CHAPTER = (" & myChap & ") And ID = (" & myID & ") ;"
End Sub

I'm running the code (my clicking the "check box") and nothing happens, I was thinking that maybe I defined the after "WHERE" statement wrong, and there are 0 entrys changed..

UPDATE: after removing the

Code:

"& "WHERE..."

row, the code does update the entire table, so I have a problem with the syntax of the sql..

View 1 Replies View Related

Updating Fields And Data On A Linked Table

Nov 14, 2007

Hi everyone,

I was wondering if this is possible to do:

I have a Form that reads from one Linked Table and Updates a Local Table. Is it possible to move the Local Table to the Back End and still be able to append fields and change field names etc?

If anyone can help, that would be greatly appreciated. Thank you in advance.

Bear

View 1 Replies View Related

Updating Fields In Access Table Using Data From Excel

Dec 6, 2005

Hello,

Been wondering how I can update fields in my Access database table using data that lies in an excel spreadsheet.
They have a common row ie say account number and other common fields that need to be updated.

thanks

View 1 Replies View Related







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