View Single Post
  #36  
Old May 30th, 2007, 05:55 AM posted to microsoft.public.access.gettingstarted
Albert D. Kallal
external usenet poster
 
Posts: 2,874
Default ACCESS DVD Database

I have an already populated "Purchasing table, imported from my
spreadsheet. It has about forty records, and uses the DVD_ID as a key.

I want to add those fields to my new "DVD_Main table, and then import
those records to the appropriate DVD_ID records in the main table. Is
this a quick, dialog based job, or do I have to jump through a few hoops
to pump the data in?


Well, you could write some code, but it much easier to use the query
builder...

So just create a blank new query, and drop in your main table (DVD_main).

Now, drop in this table with the purchase data.

Now, draw a join line from the primary key in main table to the child table.

Now, simply start double clicking on all the fields from the "main" table
that will receive merged data from the child table. You can double click on
a field name from the list of fields, or you can use drag and drop. Or even
use the combo box that appears in each empty grid slot to select the field
name. So, we are ONLY placing fields from the main table that will receive
our data.

Ok, now use the access menu, and go:

query-and select "update query".

You just changed a select query to a udpate query.

You note a new "row" called update to: appears.

Now, in the update to field, you have to type in the field name from your
2nd table. Unfornalty drag and drop does not work...

So, you type in:

MyPurchaseTable.NameOfField

You ahve to reapt the above typing for each collum you need.

once done, you simply hit the ! buttion to run the query.......

Of ocue, you will test this on a copy.

Right....of couse you test this on a copy...right???


--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada