Add records to a table from a query

Z

Zebble

Maybe I'm trying to do too much here, but here's the situation: I'm trying
to build a query that allows a user to enter an amount from a funding source,
calculate a markup (and let's the user change the markup by imposing a
limit), and calculate the balance on the budget (based on the total allocated
to the object from all funding sources).

I have three tables:

Table: Account
Account_# (key)
Account_Name
Budget

Table: Revenue
Rev_#
Rev_Name
Rev_Amount

Table: Rev_Allocation
Rev_Alloc_ID (key - autonumber)
Account_# (key)
Rev_#
Alloc_Amt

I have one query (based on the Rev_Allocation table) that totals all the
allocations to a particular account.

The query I'm trying to build would enable a user to enter an Alloc_Amt,
calculate the overhead, total the Alloc_Amt and show a balance
([Account].[Budget]-SumofAlloc_Amt). Essentially, the query would need to
add a record every time I entered a number into the Alloc_Amt field in my
query.

So far, no luck. I get dinged every time I try to enter the number. Any
suggestions? I tried doing this as an append query, but I could only see the
fields in the target table and nothing from other tables (such as Account
names).

Any suggestions? I could do this in a form, but think the query/table view
would be easier for users to navigate.

Thanks
 
A

AFSSkier

Zebble,

Try putting a prompt in a field called Alloc_Amt as Alloc_Amt: [Enter Alloc
Amt]. Sum this field, then you should be able to do your calculated field of
([Account].[Budget]-SumofAlloc_Amt).

This is similar to a prompt you would use in a criteria to prompt the user
to enter an Account#, ie [Enter Account #]. The [] allow the user to enter
info just as you would in the design view.

I'm not sure if this completely answers your question.
 
Z

Zebble

Kevin:

I'm not certain this addresses the question, but I'll give it a shot. Thanks.

Zebble

AFSSkier said:
Zebble,

Try putting a prompt in a field called Alloc_Amt as Alloc_Amt: [Enter Alloc
Amt]. Sum this field, then you should be able to do your calculated field of
([Account].[Budget]-SumofAlloc_Amt).

This is similar to a prompt you would use in a criteria to prompt the user
to enter an Account#, ie [Enter Account #]. The [] allow the user to enter
info just as you would in the design view.

I'm not sure if this completely answers your question.
--
Thanks, Kevin


Zebble said:
Maybe I'm trying to do too much here, but here's the situation: I'm trying
to build a query that allows a user to enter an amount from a funding source,
calculate a markup (and let's the user change the markup by imposing a
limit), and calculate the balance on the budget (based on the total allocated
to the object from all funding sources).

I have three tables:

Table: Account
Account_# (key)
Account_Name
Budget

Table: Revenue
Rev_#
Rev_Name
Rev_Amount

Table: Rev_Allocation
Rev_Alloc_ID (key - autonumber)
Account_# (key)
Rev_#
Alloc_Amt

I have one query (based on the Rev_Allocation table) that totals all the
allocations to a particular account.

The query I'm trying to build would enable a user to enter an Alloc_Amt,
calculate the overhead, total the Alloc_Amt and show a balance
([Account].[Budget]-SumofAlloc_Amt). Essentially, the query would need to
add a record every time I entered a number into the Alloc_Amt field in my
query.

So far, no luck. I get dinged every time I try to enter the number. Any
suggestions? I tried doing this as an append query, but I could only see the
fields in the target table and nothing from other tables (such as Account
names).

Any suggestions? I could do this in a form, but think the query/table view
would be easier for users to navigate.

Thanks
 

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