There are a couple of ways. (And incidentally, "hybrid" was just an
adjective I used to describe it; I don't think you'll find that word in
Help for Access or Excel.)
I think the easiest is to (manually) set parameters such as amount due,
interest rate, etc., in Excel, maybe on the first worksheet of your
file, where they'll be easy to find. Have Excel do its calculations
based on those values, in an Excel table that you have perhaps put onto
another worksheet. Have Excel recalculate everything after you have
changed the parameters (maybe it will do this automatically).
Then you can link an Access Table to the Excel table and use it just as
if it were a Table in Access.
For example, I just now did that -- created a new Excel file in which
the first worksheet contains these cells (in which I used Insert -->
Name --> Create to name them):
Interest Principal Payment
5.80% $10,000.00 $400.00
And the second worksheet, [Sheet2], contains cells with values like these:
A B C D
Period Principal InterestAmt PPlusI
0 $10,000.00 $48.33 $10,048.33
1 $9,648.33 $46.63 $9,694.97
2 $9,294.97 $44.93 $9,339.89
.... which are based on formulas like these:
A3: =A2+1
B3: =D2-Payment
C3: =B3*Interest/12
D3: =B3+C3
(I know, these worksheet names aren't very suggestive, I should have
chosen better ones. Sorry.)
Then, in Access, I created two Tables linked to these. The first, on
[Sheet1], I set up via File --> Get External Data --> Link Tables ... ,
and I called it [Parameters]. I specified that the first row contained
field names.
The second Access Table I linked from [Sheet2], again specifying that
the first row contained field names, and I called this Table
[PaymentSchedule]. But for this one, not wishing to accidentally change
the values, I also defined a Query, [Q_PaymentSchedule], defined via
this SQL:
SELECT PaymentSchedule.*
FROM PaymentSchedule
ORDER BY PaymentSchedule.Period;
and I set its Recordset Type property to "Snapshot", to force it to be a
read-only recordset (Access will beep at you if you try to change one of
the values).
Having done this, I was pleased to see that, if I changed a value in
[Parameters], such as the monthly payment amount, not only did that
change in Excel, but Excel also recalculated its values, and
[Q_PaymentSchedule] immediately (well, within a couple of seconds)
reflected the changed values, where they'd be available for any Forms,
Reports, other Queries, etc., that you might want to set up.
Note that the file you link to is likely to have to be runnning. You
can do this in a Macro via the following action:
RunApp: Excel db5J18a.xls
Run this Macro before trying to use the linked Tables.
Also, it's likely that your Excel options (Tools --> Options) will have
to specify automatic recalculation.
Of course, all of this stuff can be done under program control (in a
Module, using VBA language), but I'm kind of assuming you didn't want to
get involved in anything like that.
Have fun.
-- Vincent Johns <
[email protected]>
Please feel free to quote anything I say here.
Thanks very much for that. There are several loans to keep a track of. How
would I go about the Hybrid option. Excel is working but I am not sure how
I would run queries from access with excel information. Could you advise? I
would greatly appreciate any help you could offer. Thanks again.
Carmen
:
[...]
You might also consider a hybrid approach. Although Access can do the
calculations, it's probably easier to leave them in Excel, and link an
Access Table to that table in Excel. After all, your Excel version is
already working, isn't it? You might define some Queries in Access to
pull out the data that you need to include in your Access Reports.
-- Vincent Johns <
[email protected]>
Please feel free to quote anything I say here.