Me again,
I'm new to Access and am self teaching from a couple of books, so bear with
me. (I've got a little experience with Visual Basic)
As I understand so far, if I want to perform a bunch of calculations on a
set of records (not calculated fields, but doing calculations from records
to record) using Visual Basic I would first create a DAO.recordset object
with the records I want to play around with.
Assuming I've got the first part right how do I go about outputting the
results of my calculations?
I'll use a rough example to explain:
I've got a table (or query) of three records with field headers A B C & D
sitting nicely in a DAO recordset. Using VB I add the values of records 1
and 2 of field B and then divide by the contents of the third record in
field D (crazy I know, but this is just to illustrate that I'm generating
some brand new data that I want to display). I then want to display an
output of the contents of record 3, fields A B & C and then the results of
my calculations in a fourth column. I might also want to create completely
brand new field headings as well for this new 'record'.
Would I create a blank recordset to use in code in which to pass this info
into? If so, how do you create a blank recordset that doesn't refer to any
existing object? To what object would I most likely output my info to?
(I'm assuming a report. If so, can I create a 'blank' report and manually
set the field headings?
This may be an awful lot to answer on in complete detail but if I could at
least get a general direction to study on would be appreciated. I'm trying
to make a database for my own purposes and would like to actually start
creating something useful without having to 'hit the books' for months
before I could accomplish something meaningful. In time I hope to educate
myself a lot more on Access but it would be nice to get something going in
the meantime.
Thanks,
Gord
I'm new to Access and am self teaching from a couple of books, so bear with
me. (I've got a little experience with Visual Basic)
As I understand so far, if I want to perform a bunch of calculations on a
set of records (not calculated fields, but doing calculations from records
to record) using Visual Basic I would first create a DAO.recordset object
with the records I want to play around with.
Assuming I've got the first part right how do I go about outputting the
results of my calculations?
I'll use a rough example to explain:
I've got a table (or query) of three records with field headers A B C & D
sitting nicely in a DAO recordset. Using VB I add the values of records 1
and 2 of field B and then divide by the contents of the third record in
field D (crazy I know, but this is just to illustrate that I'm generating
some brand new data that I want to display). I then want to display an
output of the contents of record 3, fields A B & C and then the results of
my calculations in a fourth column. I might also want to create completely
brand new field headings as well for this new 'record'.
Would I create a blank recordset to use in code in which to pass this info
into? If so, how do you create a blank recordset that doesn't refer to any
existing object? To what object would I most likely output my info to?
(I'm assuming a report. If so, can I create a 'blank' report and manually
set the field headings?
This may be an awful lot to answer on in complete detail but if I could at
least get a general direction to study on would be appreciated. I'm trying
to make a database for my own purposes and would like to actually start
creating something useful without having to 'hit the books' for months
before I could accomplish something meaningful. In time I hope to educate
myself a lot more on Access but it would be nice to get something going in
the meantime.
Thanks,
Gord
Comment