You can't add a field to a table with an update query.
Can you get into design view and add the field to the customer table? Do
you have permissions/rights to do so? That is the simplest method. Once
the field is added then you can use an update query to populate it with the
value.
I have now added the field required in the table design view, but am
unsure how to populate it, as not all records need to contain a value,
and I can't see how (in the update query design view) to match the
Customer ID fields and then draw through the Type.
I guess the best way to explain how I want this to work is like a
VLOOKUP in Excel!
Kim
> You can't add a field to a table with an update query.
>
[quoted text clipped - 18 lines]
> > is there a way, using an update query, to add in a new Type field in
> > existing table, what the Customer type is?
John Vinson - 19 Jul 2006 17:43 GMT
>I have now added the field required in the table design view, but am
>unsure how to populate it, as not all records need to contain a value,
[quoted text clipped - 3 lines]
>I guess the best way to explain how I want this to work is like a
>VLOOKUP in Excel!
The CustomerID should be the Primary Key of both tables.
Create a new Query. Add both tables. Join them by CustomerID.
Change it to an Update query; on the "Update To" line under the Type
field that you want to update type
[Table2].[Type]
using your own table and fieldnames of course.
Run the query.
Access can DO this... easily!... but it *is not Excel and it does not
work like Excel*; you may need to "unlearn" some things to make the
best use of Access!
John W. Vinson[MVP]
klr - 20 Jul 2006 14:16 GMT
Thanks, that worked brilliantly.
> >I have now added the field required in the table design view, but am
> >unsure how to populate it, as not all records need to contain a value,
[quoted text clipped - 22 lines]
>
> John W. Vinson[MVP]