Union query to combine datas in 2 tables.

pedie

Well-known Member
Joined
Apr 28, 2010
Messages
3,875
Hi, I need help with procedure to create union query to combine datas in 2 tables.
I'm not doing any projects as such just learning it...
I have googled and found that union query can do it.
So please help.

Thanks
 
If you link the table from db2 into db1, then db1 can update the data in db2 but the db2 can't update anything in db1.
 
Upvote 0

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Okay great! will there be a problem because this db1 [the forntend is being used by multiple users...] and cant even create a picture in my mind how it might work...no experience in access...

Can you also please show the code way to open the database and update it in a click?:):(

Thanks
Pedie
 
Upvote 0
It shouldn't be a problem as long as everyone has their own copy of the frontend (which is how it should always be) and it isn't being shared from a central location.

Do you know how to create an append query? You would just create that to append the new record to the db2 table and then just call it with either:

CurrentDb.Execute "QueryNameHere", dbFailOnError

or

DoCmd.OpenQuery "QueryNameHere"

Although the CurrentDb.Execute would probably be better because it doesn't generate the confirmations that the other does. To do the OpenQuery method you would likely want to put DoCmd.SetWarnings False there before the open and set it back to true afterwards. Make sure if you don't have a single exit point that you would put the set warnings true part in the error handler as well.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top