I have to create an spreadsheet style report that takes data from a sub table like so:
Each owner has a main record and sub records for each animal:
(item) birth shots spay sold
Dog dateA dateB DateC DateD
cat dateA dateB DateC DateD
bird1 dateA dateB DateC DateD
fish2 dateA dateB DateC DateD
I have to create a report that parallels an excel spreadsheet, taking specific data from this sub-table like so:
owner1
dog birth cat birth fish birth
dog spay cat spay fish spay
dog sold cat sold fish sold
owner2...
I know that I can create a query for each specific item like so (select birth date where animal=dog) but I would be overloading my database with these queries!!
In the report do I create a recordset for each control on the report that will open a recordset for each specific piece of info like so:
dim rs as recordset
dim animal as string
dim event as date
animal = dog
event = birth
set rs = db.OpenRecordset (select birthdate from tblPets where pet= animal)
set rs = nothing
I'm feeling really confused about this, will this approach work or am I "barking up the wrong tree"?
Each owner has a main record and sub records for each animal:
(item) birth shots spay sold
Dog dateA dateB DateC DateD
cat dateA dateB DateC DateD
bird1 dateA dateB DateC DateD
fish2 dateA dateB DateC DateD
I have to create a report that parallels an excel spreadsheet, taking specific data from this sub-table like so:
owner1
dog birth cat birth fish birth
dog spay cat spay fish spay
dog sold cat sold fish sold
owner2...
I know that I can create a query for each specific item like so (select birth date where animal=dog) but I would be overloading my database with these queries!!
In the report do I create a recordset for each control on the report that will open a recordset for each specific piece of info like so:
dim rs as recordset
dim animal as string
dim event as date
animal = dog
event = birth
set rs = db.OpenRecordset (select birthdate from tblPets where pet= animal)
set rs = nothing
I'm feeling really confused about this, will this approach work or am I "barking up the wrong tree"?