D
Dave Elliott
I have a main form named TimeCards with a sub-form on it named Time and
Hours
I have another form with the same record source as the form Time and Hours
that I wish to open showing the same records as the sub-form Time and Hours
which is linked to the main form with a master/child relationship. This form
is named EmpCalc
The table where the sub-form is based on is named Hours with a HoursID as
the primary key
It also has a TimeID that is used to link it to the main form TimeCards
How can I make the new form, EmpCalc show the records that the main form
TimeCards via the sub-form shows, i.e. Time and Hours?
I tried but it didnt work!
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.OpenForm "EmpCalc", "", "[HoursID]=[Forms]![Time_Hours]![HoursID]"
'stDocName = "EmpCalc"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Hours
I have another form with the same record source as the form Time and Hours
that I wish to open showing the same records as the sub-form Time and Hours
which is linked to the main form with a master/child relationship. This form
is named EmpCalc
The table where the sub-form is based on is named Hours with a HoursID as
the primary key
It also has a TimeID that is used to link it to the main form TimeCards
How can I make the new form, EmpCalc show the records that the main form
TimeCards via the sub-form shows, i.e. Time and Hours?
I tried but it didnt work!
Dim stDocName As String
Dim stLinkCriteria As String
DoCmd.OpenForm "EmpCalc", "", "[HoursID]=[Forms]![Time_Hours]![HoursID]"
'stDocName = "EmpCalc"
DoCmd.OpenForm stDocName, , , stLinkCriteria