Report field from subform

sstasiak

Registered User.
Local time
Today, 08:22
Joined
Feb 8, 2007
Messages
97
I have a form[OncRegMain] that contains a subform[WeightDate]. The subform enters a weight[Weight] and date[DateTaken] to track patient weight gain/loss. The way I have it is that when the main form[OncRegMain] is opened to view a patient, the Weight and Date fields in the subform are automatically populated with the most recent entered value.

In my report, what would I set my record source to in order for it to use the most current weight and date that were entered?
 
Use a query that links you mainform's table and your subform's table (probably already done by a patient ID or something) and then use a Max on the date field, as in MostCurrentDate: Max([YourDateFieldName]).
 
Moniker

I'm still very new to MS Access, so I'll explain how I have it now. The main table[tblOncReg] is linked to [tblWeightDate] by a key[MEDRECNO]. I'm not sure if I did it using a query though. Somehow I think I did it by making the WeightDate form a subform of OncRegMain and then assigning the parent and child keys?? Not sure, I'll have to check when I get in the office tomorrow.

Please let me know if that even sounds like that makes sense. Should I be using queries to link tables?
 
Clarification: I don't need to display the most current date that a weight was taken....I need to display the weight associated with the most current date for that particular patient.
 

Users who are viewing this thread

Back
Top Bottom