Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy fields from Excel to use Access Relationships

Status
Not open for further replies.

philipose

Programmer
Dec 24, 2003
137
US
Hi,

I am trying to show DB Relationships using MS Access. I have the tables, fields and descriptions in an excel spreadsheet. I tried copying and pasting the all the fields of a table into the 'Design' screen in Access but it did not work. There are more than 200 columns so copying and pasting one column at a time would be very time consuming.

Any suggestions would be helpful.

Regards
Philipose
 



hi,

The only thing that you can paste into Access is SQL, using the tables and join relationships.

Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Are you actually trying to create a database from a description of tables and field, just diagram a relationship model based on a description of tables and fields, or create a database based on actual tables and fields in a spread sheet?
You need to describe better what you have and what you are trying to do.

There are a lot of tools out there that allow you to create the entity relationship and diagram the relationships without actually creating the database. Or you can use the model to create a database from the description of the database. ERwin or even Visio are two well known tools for doing this. However there are a lot of freeware tools to do this. Take a look at this thread I have not used any of the tools mentioned except ERwin, but that is not free and probably beyond your needs:

You can also use ADO/DAO to do this, and it would not be that much code
Assuming each sheet describes a table, contains field names, data types, key information, and related field information
1)Read each worksheet
2)Create a table definition from each worksheet
3)add to database the table def
4)Read the fields in the worksheet
5)add the fields to the table def
6)set the datatype and keys
7)create your relation definitions
8)add the relation definition to the database
 
Thanks for your responses. I am merely trying to create a ER diagram and not a DB. I have a multiple tables and columns (200 odd columns in total) in an excel spreadsheet. Let me see if any of the freeware tools from the link that MajP suggested. I do have visio but I am not sure if I can copy and paste the fields directly and make up an ER diagram.

Regards
Philipose
 
You can do an import into visio. Choose "database", "import". I am not sure how you data is set up, but it should be able to at least get your fields and allow you to set the datatypes and keys.
 
MajP,

Under Visio, "database", "import" there seems to be only 2 options: ie import an ERWin file (.ERX file) or import a Visio Modeller file (.IMD)
 
Sorry try reverse engineer. At least it should help to create a table with the field in the entity model. You may have to put the fields into columns. I did not try with fields as rows.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top