T
twalsh
I have Form and the point eventually will be to have 2 weeks of payroll data
side by side. So naturally I want to have 2 side by side subforms, both
eating off the same query of the payroll data.
above each half/subform i want a text box where you can select your payroll
date and change what's in the subform. So for example in the left hand side
you can view the first week of august and in the right hand form you can view
the first week of september.
right now i have a simple form that can open each week of data in a new form
using the command button wizard i came up with the below code, how do i alter
it to display the data in a subform instead??
Private Sub cmdOpenAcctView_Click()
On Error GoTo Err_cmdOpenAcctView_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmACCTPayrollData"
stLinkCriteria = "[WEEK]=" & "#" & Me![txtWeek] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenAcctView_Click:
Exit Sub
Err_cmdOpenAcctView_Click:
MsgBox Err.Description
Resume Exit_cmdOpenAcctView_Click
End Sub
side by side. So naturally I want to have 2 side by side subforms, both
eating off the same query of the payroll data.
above each half/subform i want a text box where you can select your payroll
date and change what's in the subform. So for example in the left hand side
you can view the first week of august and in the right hand form you can view
the first week of september.
right now i have a simple form that can open each week of data in a new form
using the command button wizard i came up with the below code, how do i alter
it to display the data in a subform instead??
Private Sub cmdOpenAcctView_Click()
On Error GoTo Err_cmdOpenAcctView_Click
Dim stDocName As String
Dim stLinkCriteria As String
stDocName = "frmACCTPayrollData"
stLinkCriteria = "[WEEK]=" & "#" & Me![txtWeek] & "#"
DoCmd.OpenForm stDocName, , , stLinkCriteria
Exit_cmdOpenAcctView_Click:
Exit Sub
Err_cmdOpenAcctView_Click:
MsgBox Err.Description
Resume Exit_cmdOpenAcctView_Click
End Sub