T
tomanddani via AccessMonster.com
Hi,
I have a form with one subform. The form is from tblBusiness and the subform
is from tblWorkorders. They have a one to many relationship. One business can
have several work orders.
The main form has a textbox from a tblBusiness field called Cycle. This field
contains a number that is associated with the business. The subform has a
textbox from a tblWorkorders field called VisitDate. This field contains a
date associated with the workorder.
I need to have a textbox on the form that adds the Cycle number from the main
form to the year of the VisitDate from the subform. This is what I tried:
" =DateAdd("yyyy",[Cycle],[frmWorkordersSub].[Form]![VisitDate])".
This works except that I need it to add the number to the latest or largest
date value of that businesses records. This formula adds it to the record
displayed. Can I change this so it works on the last date instead of each
record?
Maybe a Max function or something?
Thanks,
Tom
I have a form with one subform. The form is from tblBusiness and the subform
is from tblWorkorders. They have a one to many relationship. One business can
have several work orders.
The main form has a textbox from a tblBusiness field called Cycle. This field
contains a number that is associated with the business. The subform has a
textbox from a tblWorkorders field called VisitDate. This field contains a
date associated with the workorder.
I need to have a textbox on the form that adds the Cycle number from the main
form to the year of the VisitDate from the subform. This is what I tried:
" =DateAdd("yyyy",[Cycle],[frmWorkordersSub].[Form]![VisitDate])".
This works except that I need it to add the number to the latest or largest
date value of that businesses records. This formula adds it to the record
displayed. Can I change this so it works on the last date instead of each
record?
Maybe a Max function or something?
Thanks,
Tom