I need help with passing data from one form's query to another.
I have a form with mainform and a subform. The mainform has the lngTrainerID field. The subform has the dtmDate field. I use that field to create two fields in my query, FirstDayofWeek: ([dtmDate]-Weekday([dtmDate]))+2 and LastDayofWeek: ([dtmDate]-Weekday([dtmDate]))+6. These appear on my subform along with the dtmDate field.
I want to link this form to another form by using the lngTrainerID, FirstDayofWeek and LastDayofWeek fields. The lngTrainerID field iinks fine using DoCmd.OpenForm "frmWeeklyHours", acNormal, , "lngTrainerID = " & Me.lngTrainerID but I want to also link the FirstDayofWeek and LastDayofWeek fields the same way but it won’t work. These two fields are also in my second forms query. I have tried everything in know but can’t get it to work. Can anyone help me? Thanks in advance.