I hope I can explain this properly. I have two split forms, one is Manager_Queue and one is Assigned_Queue.
Depending on whether the user is a manager or workerbee they select a record from one screen or the other.
The workerbee cannot open the record from the manager queue.
On rare occasions we have had a record overwrite another.
Here is the snippet of code that I think is causing my issue. How can I clean it up? Thanks
' open recordsets
Set db = CurrentDb
'Depending on which form is open run the sql
If IsOpen("Manager Queue") Then
If Forms![Manager Queue].Form.RecordsetClone.RecordCount <> 0 Then
sSQL = "SELECT Assigned_DDQs.* FROM Assigned_DDQs WHERE Parent = " & Forms![Manager Queue]![Parent]
End If
End If
If IsOpen("Assigned_List") Then
sSQL = "SELECT Assigned_DDQs.* FROM Assigned_DDQs WHERE Parent = " & Me.txtItem
End If
Set rst = db.OpenRecordset(sSQL)
With rst
.Edit
Depending on whether the user is a manager or workerbee they select a record from one screen or the other.
The workerbee cannot open the record from the manager queue.
On rare occasions we have had a record overwrite another.
Here is the snippet of code that I think is causing my issue. How can I clean it up? Thanks
' open recordsets
Set db = CurrentDb
'Depending on which form is open run the sql
If IsOpen("Manager Queue") Then
If Forms![Manager Queue].Form.RecordsetClone.RecordCount <> 0 Then
sSQL = "SELECT Assigned_DDQs.* FROM Assigned_DDQs WHERE Parent = " & Forms![Manager Queue]![Parent]
End If
End If
If IsOpen("Assigned_List") Then
sSQL = "SELECT Assigned_DDQs.* FROM Assigned_DDQs WHERE Parent = " & Me.txtItem
End If
Set rst = db.OpenRecordset(sSQL)
With rst
.Edit