Darren Bartrup
Well-known Member
- Joined
- Mar 13, 2006
- Messages
- 1,297
- Office Version
- 365
- Platform
- Windows
Hi all,
I'm having some serious problems figuring out how to get this to work:
I have a database set up to record the work received by a single team and processed by the multiple members of the team. There are also different types of work that may be received and processed (identified by lProcessID) - so the team could receive 10 English Workflows and 20 Scottish Workflows which are recorded separately.
So I have a table called tblTeamData and another called tblIndividualData to record this - plus others with team member names, timesheets, process names, absenteeism, etc.
The fields in question are:
I have a query called qryBALANCE_OSBalAtDate which calculates the Brought Forward Balance, Total Received, Total Allocated, Total Not Completed and the Outstanding Balance for each process on a particular date.
The problem:
I have a form called frmTeamData that is set as Continuous Forms and shows all processes for a single day. The user enters the number of items for each process that are received that day by the team.
Due to problems with update-able queries I'm having trouble showing the BF Bal, Total Allocated, Total Not Completed and OS Bal next to the Received amount - these need to change as the total received is entered, but I can't include them in the recordsource for the form as their inclusion like that makes the received amount non-update-able.
So.... I have placed qryBALANCE_OSBalAtDate in a subform in the form footer and set this to Datasheet view - which Access complains about, but accepts.
Now if I tell my B/F Bal control on the main form to look at the B/F Bal control on the subform it works - but I just get the first record for each instance, so all Process ID's on the main form get the value of the first Process ID on the subform. If I link the forms the subform only shows the one record.
I tried this code, which steps through the recordset and sets the value to the last Process ID (and wouldn't guarantee that the two recordsets are in sync even if it did work):
Is there a way someone could explain to pull the correct figures for the correct records from the subform and place it in the main form?
Many thanks in advance for any help offeredn.
I'm having some serious problems figuring out how to get this to work:
I have a database set up to record the work received by a single team and processed by the multiple members of the team. There are also different types of work that may be received and processed (identified by lProcessID) - so the team could receive 10 English Workflows and 20 Scottish Workflows which are recorded separately.
So I have a table called tblTeamData and another called tblIndividualData to record this - plus others with team member names, timesheets, process names, absenteeism, etc.
The fields in question are:
- tblTeamData.lProcessID
- tblTeamData.dDate
- tblTeamData.lReceived
- tblIndividualData.dDate
- tblIndividualData.lProcessID
- tblIndividualData.lAllocated
- tblIndividualData.lNotCompleted
I have a query called qryBALANCE_OSBalAtDate which calculates the Brought Forward Balance, Total Received, Total Allocated, Total Not Completed and the Outstanding Balance for each process on a particular date.
The problem:
I have a form called frmTeamData that is set as Continuous Forms and shows all processes for a single day. The user enters the number of items for each process that are received that day by the team.
Due to problems with update-able queries I'm having trouble showing the BF Bal, Total Allocated, Total Not Completed and OS Bal next to the Received amount - these need to change as the total received is entered, but I can't include them in the recordsource for the form as their inclusion like that makes the received amount non-update-able.
So.... I have placed qryBALANCE_OSBalAtDate in a subform in the form footer and set this to Datasheet view - which Access complains about, but accepts.
Now if I tell my B/F Bal control on the main form to look at the B/F Bal control on the subform it works - but I just get the first record for each instance, so all Process ID's on the main form get the value of the first Process ID on the subform. If I link the forms the subform only shows the one record.
I tried this code, which steps through the recordset and sets the value to the last Process ID (and wouldn't guarantee that the two recordsets are in sync even if it did work):
Code:
Private Sub txtReceived_AfterUpdate() Dim rs1 As DAO.Recordset, rs2 As DAO.Recordset
Set rs1 = Me.frmOSBalance_subform.Form.RecordsetClone
Set rs2 = Me.Form.RecordsetClone
rs1.MoveFirst
rs2.MoveFirst
Do While Not rs1.EOF
Me.txtBFBal = rs1.Fields("BFBal")
rs2.MoveNext
rs1.MoveNext
Loop
End Sub
Is there a way someone could explain to pull the correct figures for the correct records from the subform and place it in the main form?
Many thanks in advance for any help offeredn.