Calculated fields in a subform

G

Guest

I am working on a purchase entry database and I'm stumped. I have a table
filled with budgets (year, month, clock, expense_code, amount). I also have
a table for purchases (clock, date, expense_code, amount). I have a form
that requires three selections from the budgets table (year, month, clock).
From these three selections I want the subform to show the expense_code and
total_spent (calculated field - total spent per expense_code per person).
I'm trying to figure out the queries behind this but I'm just spinning my
wheels. The query for the main form is based on the budgets table. The
query for the subform is based on the purchases table. How do I link this up
to only show each expense_code for each clock? Does referential integrity
enter into this? Thanks!

floprock
 
G

Guest

off the cuff - and not fully understanding what you are saying - - - I would
say look toward simply creating a new 3rd query that is based on the two
tables.

Nothing in the first two queries prevents you from a separate 3rd query
using the same fields.

One presumes there is a logical "key" field that is common to these two
fields......in your new query be sure to select that field in each table -
yes you will have the same value repeated - but for now that is a good sanity
check....you can eliminate one down the road in the window dressing stage of
your form.....
 

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