I have done this both ways through a query and a report. To use the query option I use the excel external data method and have the query import into excel then have the calculations I want done completed on a separate sheet within the workbook.
To use the report is a little more time consuming...
I have somewhat the same problem and am currently using a label as a reference to get the age. I have the field DOB(Date of Birth) and then have a label with the function =Now()-[DOB] as the control source. Once I get the age I input it into the a AGE field.
I could like to get it to...
No the text boxes do not have to be visible, yes you should use the click event for the calendar control to make the IF statement work.
As for the command button to show the subforms, I would suggest using query by example with the criteria for each query being "Between BeginDate and...
Don't know if this will help but I would use two text boxes one for BeginDate and one for EndDate, then use a label (lblNum) for a number identification.
Then use a if statement such as this:
Private Sub calendar_click()
If lblNum.Caption = 1 then
BeginDate.Value = Calendar.Value...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.