View Full Version : Creating new field in table with linked info


janasmith
01-06-2010, 07:34 PM
I believe what I need to do is use an append query but it didn't work so I'll explain my dilemma.

I have two tables which I have imported from excel, one has an ID number and other data, and the 2nd is a list of the ID numbers that comply with a certain condition. I need to create a new field in the first table which indicates yes or no as to whether or not that ID number complies with the condition (according to the data drawn from table 2). How do I do this?

I would greatly appreciate any help!

ajetrumpet
01-06-2010, 07:49 PM
this problem is not described very well. however, I am guessing that you need a subquery, like so:WHERE [id] IN (SELECT [id] FROM [OTHER TABLE])it's that simple.

for the whole query, simply select your field from table1, and then then create a field for number two that's whatever kind of field you want. you'll need a make table query here, and then replace your old one.

it defaults to a text field, so if you want to make it a boolean, you have to do that before hand, then run an UPDATE query instead, with a suquery in it. make sense ?