Solved Segregating tables/queries/forms/reports (1 Viewer)

neilsolaris

Member
Local time
Today, 14:28
Joined
Apr 19, 2020
Messages
114
Hi,

I have a database set up for one company at the moment. I would like to add another company to this database, as both companies share the same customers and suppliers, more or less. However, to make it look cleaner, is there a way to set it up, so that the left pane (the one showing all the tables, queries, forms etc) can switch between displaying details relating only to company 1 or details relating only to company 2? I hope I've phrased my question ok.

I'm using Access 2007 by the way. I can see that if I click on All Access Objects, it brings down a menu, and one of the items is Custom. I'm worried to play around with it though in case I mess everything up!

Many thanks for your help.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:28
Joined
May 7, 2009
Messages
19,230
you don't need a separate table/queries/forms, etc.

create a table with (autonumber field as PK), company name (string).
this table will serve as the master list of all Companies.
then you modify the structure of the other table to Add another Column (long)
that will hold the PK of the company.

you will then need to modify the queries.
 

neilsolaris

Member
Local time
Today, 14:28
Joined
Apr 19, 2020
Messages
114
Thanks for that, I haven't thought of doing this.

So I also need to adapt certain queries, forms and reports to only show information pertaining to a particular company, based on the PK in the table?

Edit Thinking about it more, I guess in a query, I'd just select the company name (or company code) in the criteria box, to pull up info relating to that particular company? With some of the forms and reports I might need to think it through a little more.
 
Last edited:

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 21:28
Joined
May 7, 2009
Messages
19,230
i am sure it will be easy if you have an example to see.
 

Attachments

  • multiCompany_db.accdb
    520 KB · Views: 308

neilsolaris

Member
Local time
Today, 14:28
Joined
Apr 19, 2020
Messages
114
Many thanks arnelgp. It's proving very straightforward so far. You've made my life much easier than it would have been otherwise! Thanks again.
 

Users who are viewing this thread

Top Bottom