Adding previous year value to a form automatcally(and updating tab

F

Freida

I need help with this soooooo Badly. I have a form, within a form linked to
2differnt budget tables. The first form there is Budget ID, budget begin
and budget end(both mm/yyyy formats. The sub form there is a budget ID,
record ID, Company, Account, current year budget amount. prior year Budget
AMT , Prior year Actual amount , variance and percent- in that order.

I want to know how do I populate the prior year budget and actual amount
automatatically after the current budget year amount if put in. The prior
year Budget is in the same table as the current year. Name of the table that
is linked to the subform is called budget account. The name of the table
linked the first form is called Budget . Any help is greatly appreciated, I
have no idea on where to start.
 
K

KARL DEWEY

This query for source of the subform will get you started.
SELECT [budget account].[budget ID], [budget account].Company, [budget
account].Account, [budget account].[budget amount], Format([budget
account].[budget year],"yyyy") AS [Current year], Format([budget
account_1].[budget year],"yyyy") AS [Previous year], [budget
account_1].[budget amount]
FROM [budget account] INNER JOIN [budget account] AS [budget account_1] ON
[budget account].[budget ID] = [budget account_1].[budget ID]
WHERE (((Format([budget account_1].[budget year],"yyyy"))=Format([budget
account].[budget year],"yyyy")-1));
 

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