relating more than one field?

G

Guest

I have created a database with 3 tables. First table of employees with an
EmployeeID autonumber. Then a table with a list of companies *airlines,
hotels, car rentals* with that list as the key for that table. Then an
expense table with the employeeID, Company name, Amount and an Autonumber key
called ExpenseID.

Both the employee table and the company table have these automatic subtables
with the expenses which is what I was going for. I wanted to be able to add
expenses from either of those two and leave the expense table behind the
scenes. The problem is that when you open the expense subsheet in the company
table its listed by the Employee autonumber. Since this is meaningless and
there could easily be a huge number of employees I would like to figure out a
way to still use names to add expenses............


Sorry for the long post. Hope it made sense. Thank you for your time.

Ryan
 
G

Guest

As a PS.. Ive was thinking that I could make either a query where I could
update everything or I tried using a make table query just as a random
thought. It updated some of the information but not all of it. I added an
expense and included someone's name. It added the person to the list of
people but not the expense and his subdata sheet was empty...... anyway just
the path I've been thinking about..

Ryan
 
T

Tim Ferguson

oth the employee table and the company table have these automatic
subtables

If you mean the subdatasheets that appear when you look at your data in
table datasheets, don't worry about them. You really don't want to be
looking at table datasheets except for design and debugging.

If you want to interact with your data, use a form.
If you want to look at your data, use a report.
add expenses from either of those two and leave the expense
table behind the scenes.

I'm not quite sure what this means. The normal way to go about things is
to analyse the business process (of adding expenses) and then designing a
form to support that process. From the way you have described your setup,
there are dozens of ways you could be doing that, but only you will know
which one fits your needs best.
The problem is that when you open the expense
subsheet in the company table its listed by the Employee autonumber.
Since this is meaningless and there could easily be a huge number of
employees I would like to figure out a way to still use names to add
expenses............

This is just one reason why looking at table datasheets is a rubbish way
of doing anything in a database. It's really not very hard to create a
query that will display the company name, the employee's name and the
expence amount etc.

Hope that helps


Tim F
 

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