Update Query in Access.

F

Frank's Email

I have an access database with two tables: Main1 and Main2.

Main1 has a field named "firstname". Main2 also has a field named
"firstname. Table Main1 "firstname" has names in it; however, the Main2
table field "firstname" is null.

How do I use an update query to populate Main2 with the first name data from
table Main1?

Any assistance is greatly appreciated.
 
G

Guest

Try that

UPDATE Main2 INNER JOIN Main1 ON Main2.UserId = Main1.UserId SET
Main2.firstname = [Main1].[firstname]

in that case I connected the two tables by userid, you connect them with
your field
 
G

Ghost

Thanks a bunch for help.

However, I am still having trouble. This is what I did.

While in query design mode, it looks like this:

______________________________________________

Main1 joined to main2 on the ID field.

Note: Main1 has the firstname field populated
Main2 firstname field is null.

_______________________________________________

Field: firstname
Table: Main1
Update to: [main2].[firstname]
Criteria: [Main1].[firstname]=[Main2].[firstname]

_______________________________________________

When running the query, it returns 0 records. What am I doing wrong?.

Any furhter assistance is much appreciated.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top