How to structure an inout form/query

R

Robbie G

I have a table called tblBudgets with fields: Year, Month, Category and
BudgetAmount.
I am trying to create a form that will allow me to input a budget amount for
each category in a specific month.
I have tried this by creating a query (which selects displays the Year,
Month, Category and BudgetAmount for a specific month from tblBudget) and
using this as the basis of a form. This all looks good except i can't input
any values into BudgetAmount (I guess because the form is based on a query
not a table).

2 questions:
i) How should I do this?
ii) How can I get the default BudgetAmount to equal the corresponding budget
from the previous month?

thanks,

Robbie
 
S

scubadiver

If your table is a simple select query this shouldn't be a problem when
using it as a source for a form. If you are doing anything else to it like
grouping then it will make the query non-updateable.
 
R

Robbie G

Its not a simple select query - I was getting a month and year from another
(unrelated) table. I managed to do this using a filter but how do i automate
creating a filter based on a query and then doing filter by form?

Also, to try and set the default values of each budget category to be the
same as the previous month's budget for the same category have i got to
create a self relationship for the table?

thanks.
 
S

scubadiver

When I have used a query as a source for a form I put the criteria directly
into the query and then use an after update event to requery the records.

Your second question is similar to a question answered in the last couple of
weeks but I am not sure whether I would be able to find the response with the
code.

Sorry I can't be of much more use.
 

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