update 2 table

clmowers

New member
Local time
Today, 12:19
Joined
Apr 20, 2006
Messages
4
Hello, i was wondering i need to update 2 table with 1 form. Basicly when i add a new person to table A with the form i need it to copy 1 field into table B. How do i go abouts to do this.
Thanks
 
Try with APPEND QUERY, in Form After Update event.
DoCmd.OpenQuery "QueryName"
 
Hi MStef, I was trying a append query but it keep telling me that it was going to update 79,000 line when it should only have done 1. Im not to familiar with the whole action queries so it possible that I was setting it up wrong. This is my info
TABLES:
USERS
USERS AND LICENSES

I have a form that is based on Users and licenses that I input new users and there info. I would like it so when I added info into this form it added the users name into both table. Then query I tried was trying to copy the whole table into the other table. Again I might have set it up wrong. Im not to familiar with action queries. So any direction on how exactly I should set this up would be great. I could post the database if someone would like to look at it
 
The only problem with using a append query is the end use will get a box that states you are appending so many records to this table. Fine but you will get phone calls on it. the easiest way to do this is to create a relationship between the 2 table and check the referention integrity and casecade update and deletes. This will enable you to update both table and the end user will never know whats going on.
 
The only problem with using a append query is the end use will get a box that states you are appending so many records

If you type the following the above messages will not appear

DoCmd.SetWarnings = False
Run your query
DoCmd.SetWarnings = true
 
hi Smart, Good point didnt think about that.

clmowers, Yes you can do either one. Both option are good choice. Depending on you knowledge of access and how you table are setup, your better bet might be the append query
 
Hey thanks everyone for your help. I ended up creating a 1 to 1 relationship with my table and did the cascade update. thanks everyone
 
Last edited:

Users who are viewing this thread

Back
Top Bottom