I've been working on a problem of how to retrieve data from specific records to be used in queries and reports. To give a generalized description of what I need to do, my tables include "project info" and "project activities". The activities table I set up so that there are records only for the activities that relate to that project. A record would contain the project#, a description of the activity, due date, completion date, and billing date. (The typical order table and order detail table used in database design class).
What I need to be able to do is to populate each field in a report (or query) like so:
Project#A
due date complete date bill date
step1 1/1/01 1/2/01 1/15/01
step2 1/14/01 1/31/01 2/3/01
step3 3/1/01 3/1/01 3/15/01
etc
Project#B
(repeat steps)
I tried using DLookup in a query, but that didn't work - the result was to give the 1st due date for step1 that it could find, but I need the 1st due date for step1 for projectA.
I haven't done any programming since I graduated 3 yrs ago (tsk tsk) so I am rusty. If anyone can help me write a DLookup that will find the specific record, FANTASTIC!!
Should I instead write a function that would bring in the step#, and then create a recordset for that step#? If memory serves me I would put that public function in module1, being sure to close the recordset at the end of the function. Yes?
Speed wise: if I am running a report with 200 projects, and each project has 50 different dates to populate, is my idea going to blow up, causing excessively slow reporting? Can you give me any advise in building this function? Thanks!
What I need to be able to do is to populate each field in a report (or query) like so:
Project#A
due date complete date bill date
step1 1/1/01 1/2/01 1/15/01
step2 1/14/01 1/31/01 2/3/01
step3 3/1/01 3/1/01 3/15/01
etc
Project#B
(repeat steps)
I tried using DLookup in a query, but that didn't work - the result was to give the 1st due date for step1 that it could find, but I need the 1st due date for step1 for projectA.
I haven't done any programming since I graduated 3 yrs ago (tsk tsk) so I am rusty. If anyone can help me write a DLookup that will find the specific record, FANTASTIC!!
Should I instead write a function that would bring in the step#, and then create a recordset for that step#? If memory serves me I would put that public function in module1, being sure to close the recordset at the end of the function. Yes?
Speed wise: if I am running a report with 200 projects, and each project has 50 different dates to populate, is my idea going to blow up, causing excessively slow reporting? Can you give me any advise in building this function? Thanks!