If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Add several fields or columns
Hi,
Starting out with a table (Table1) how may I, using design grid preferably: (i) add several new fields to Table1 ? (ii) add the same fields in a new table (Table2) whose records corresponds to the existing table via IDs? [Think of Table1 as having people's name, and new fields to be added are social security and date of birth. ] Thanks. David |
#2
|
|||
|
|||
Hi,
Do you mean you wish to add the new fields using SQL as opposed to opening the table in design view? You can use the Alter Table statement but you can't do it from the query design grid. You must choose the SQL view. Here's an example of adding your date of birth field: ALTER TABLE Table1 ADD COLUMN DOB DATETIME; Not sure what data type you want the social security to be. Also, there is no need to add these fields to another related table. If your tables are linked by IDs, just use a query to see results from both tables. -- HTH Dan Artuso, Access MVP "david" wrote in message ... Hi, Starting out with a table (Table1) how may I, using design grid preferably: (i) add several new fields to Table1 ? (ii) add the same fields in a new table (Table2) whose records corresponds to the existing table via IDs? [Think of Table1 as having people's name, and new fields to be added are social security and date of birth. ] Thanks. David |
#3
|
|||
|
|||
Hi Dan,
You have answered question 1 of my 2 questions. Thanks. Could you help figure out question 2 as well? For question 2, my intent is to place the new fields (DOB, etc) in a new table. How may I create this new table (which initially may hold just blanks for field values - i.e. the data for DOB etc will be copied from some other sources later.) In other words, I need to create the new table (as place holders) and be able to link it by querry to the first table, record by record. Hope my explanation is not too confusing. David "david" wrote: Hi, Starting out with a table (Table1) how may I, using design grid preferably: (i) add several new fields to Table1 ? (ii) add the same fields in a new table (Table2) whose records corresponds to the existing table via IDs? [Think of Table1 as having people's name, and new fields to be added are social security and date of birth. ] Thanks. David |
#4
|
|||
|
|||
On Sun, 3 Oct 2004 15:33:03 -0700, "david"
wrote: In other words, I need to create the new table (as place holders) and be able to link it by querry to the first table, record by record. Hope my explanation is not too confusing. If you will be populating the new table with the intent that it contain data from the old table, you can cut out the intermediate step by creating a MakeTable query based on your old table. If you create an empty table there is nothing in its records upon which you can link! If for some reason you really need the multistep process, try: - Copy and paste the table to a new table; choose the "design only" option. This will create an empty table with all the fields of the old table. - Go into design mode and delete fields as needed. - Run an Append query from the old table into the new table, using criteria as appropriate to select which records to add. John W. Vinson[MVP] Join the online Access Chats Tuesday 11am EDT - Thursday 3:30pm EDT http://community.compuserve.com/msdevapps |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Fields - Columns | Bill | Worksheet Functions | 3 | September 7th, 2004 08:36 AM |
Menu Bar Security and UNHIDING columns | AccessNana | General Discussion | 1 | August 29th, 2004 02:33 PM |
comparing data and return only data that exsist in the 2 columns | victorwill | Worksheet Functions | 2 | December 27th, 2003 01:13 AM |
Adding rows in two dynamic columns | Justin Etheredge | Worksheet Functions | 0 | November 24th, 2003 11:27 PM |