Solved

Access 97 Back end Update

Posted on 2014-01-13
4
490 Views
Last Modified: 2014-01-13
Good Morning All,
          I have recently finished updating the front end of my companies database. To bring things in line with what they wanted I have had to add fields to some of the back end tables. Now I find my self almost ready to go live and stuck on how to move the current data in to the new tables. I have tried using different query but I'm new at Access 97 so I'm sure i'm missing something. i'm getting key violations on the append query which looks like the one I should use. please help.
                                 Thank you for your time
                                                            DWG
0
Comment
Question by:Denthion
4 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 39776688
Don't know whether the backend has any relationships defined, but if it does, then you must load the tables in the proper order.  Those tables on the one side of one-to-many relationships must all be loaded first, otherwise, you will get those foreign key errors.
0
 
LVL 31

Expert Comment

by:Helen_Feddema
ID: 39777048
New at Access 97???  That version is almost 20 years out of date.  I suggest upgrading to Access 2010.  Much work will need to be done to upgrade code, but it should be done now, as you may not even be able to open Access 97 databases in current Access versions before long.
0
 
LVL 34

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39777444
Access 97 is an oldy but a goody but I agree with Helen.  It's time to come into this century and I would do it with A2010 if at all possible.  I don't even know if you can still buy it but if you can, you should get it while it is still available since A2013, which is the current version can no longer read A97 databases at all.  I guess MS couldn't get people to give up A97 and so they decided to force the issue.

How to convert the data depends a lot on the type of changes you made.  If it was basically adding columns, changing column definitions, adding/deleting indexes, you can use DDL queries to make the old database conform and not have to reload all the tables.

Look up Data Definition Language in Access help (from a code window NOT from the GUI) or on the Web for examples of the types of queries you will need to create.  Here's an example to add a column to a table:

ALTER TABLE Employees ADD COLUMN Notes TEXT(25)

You can add multiple columns at once.

Here's another to change a column definition:

ALTER TABLE Employees ALTER COLUMN ZipCode TEXT(10)

Here's an example that is more complicated.  It is in VBA but it doesn't have to be.  You can just create the query directly.

This example creates a new table called MyTable with two text fields, a Date/Time field, and a unique index made up of all three fields.



VBA


Sub CreateTableX2()
 
    Dim dbs As Database
 
    ' Modify this line to include the path to Northwind
    ' on your computer.
 
    Set dbs = OpenDatabase("Northwind.mdb")
 
    ' Create a table with three fields and a unique
    ' index made up of all three fields.
    dbs.Execute "CREATE TABLE MyTable " _
        & "(FirstName CHAR, LastName CHAR, " _
        & "DateOfBirth DATETIME, " _
        & "CONSTRAINT MyTableConstraint UNIQUE " _
        & "(FirstName, LastName, DateOfBirth));"
 
    dbs.Close
 
End Sub
0
 

Author Closing Comment

by:Denthion
ID: 39777710
Thank you, This is the kind of information i was looking for.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now