L
lbernarde
I'm trying to set my group level using code I've found on the msg board. I'm
getting the following error:
The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time. (Error
3197)
Private Sub Report_Open(Cancel As Integer)
Select Case Forms![frm_report_status]![cmbx_sort_order]
Case "Due_Date" 'Due Date
Me.GroupLevel(0).ControlSource = "Due_Date"
Me.GroupLevel(1).ControlSource = "GroupName"
Me.GroupLevel(2).ControlSource = "Report_Type"
Case 2 'Company
Me.GroupLevel(0).ControlSource = "Company"
Me.GroupLevel(1).ControlSource = "LastName"
Me.GroupLevel(2).ControlSource = "FirstName"
End Select
sql_source = "SELECT tbl_GroupPlan_Reports.*" & _
" FROM tbl_GroupPlan_Reports" & _
" WHERE
(((tbl_GroupPlan_Reports.Report_type)=nz([Forms]![frm_report_status]![txt_reporttype],[tbl_GroupPlan_Reports]![Report_type]))
AND
((tbl_GroupPlan_Reports.GroupID)=nz([Forms]![frm_report_status]![cmbx_group_name],[groupID]))
AND
((tbl_GroupPlan_Reports.Due_date)>=nz([Forms]![frm_report_status]![txt_daterangestart],[due_date])
And
(tbl_GroupPlan_Reports.Due_date)<=nz([Forms]![frm_report_status]![txt_daterangeend],[due_date])));"
Me.RecordSource = sql_source
End Sub
getting the following error:
The Microsoft Jet database engine stopped the process because you and
another user are attempting to change the same data at the same time. (Error
3197)
Private Sub Report_Open(Cancel As Integer)
Select Case Forms![frm_report_status]![cmbx_sort_order]
Case "Due_Date" 'Due Date
Me.GroupLevel(0).ControlSource = "Due_Date"
Me.GroupLevel(1).ControlSource = "GroupName"
Me.GroupLevel(2).ControlSource = "Report_Type"
Case 2 'Company
Me.GroupLevel(0).ControlSource = "Company"
Me.GroupLevel(1).ControlSource = "LastName"
Me.GroupLevel(2).ControlSource = "FirstName"
End Select
sql_source = "SELECT tbl_GroupPlan_Reports.*" & _
" FROM tbl_GroupPlan_Reports" & _
" WHERE
(((tbl_GroupPlan_Reports.Report_type)=nz([Forms]![frm_report_status]![txt_reporttype],[tbl_GroupPlan_Reports]![Report_type]))
AND
((tbl_GroupPlan_Reports.GroupID)=nz([Forms]![frm_report_status]![cmbx_group_name],[groupID]))
AND
((tbl_GroupPlan_Reports.Due_date)>=nz([Forms]![frm_report_status]![txt_daterangestart],[due_date])
And
(tbl_GroupPlan_Reports.Due_date)<=nz([Forms]![frm_report_status]![txt_daterangeend],[due_date])));"
Me.RecordSource = sql_source
End Sub