Hi Mike,
If I'm understanding your question correctly, there are a couple of ways you can do it. Which one you choose will depend greatly on the type of reporting you wish to achieve.
1) All companies data are stored in a single set of tables. Separating the data is done through something like a CompanyID. So as an example to see invoices for a given date range you would also need to pass the CompanyID. If you wanted to see sales for ALL companies, you would simply set the CompanyID to null.
2) Each company has its own set of tables, in most cases stored in different directories. To switch companies you simply close the files, switch paths by using the HChangeDir and then reopen the tables. This method presents challenges when trying to do reporting across all databases.
HTH,
Cheers!
Ken