Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Access 97 Back end Update

Posted on 2014-01-13
4
Medium Priority
?
500 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 49

Expert Comment

by:Dale Fye
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 40

Accepted Solution

by:
PatHartman earned 2000 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In a use case, a user needs to close an opened report by simply pressing the Escape (Esc) key. This can be done by adding macro code in Report_KeyPress or Report_KeyDown event.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

971 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