Solved

Access 97 Back end Update

Posted on 2014-01-13
4
491 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

896 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

15 Experts available now in Live!

Get 1:1 Help Now