BusyBeeBiker
New member
- Local time
- Today, 13:17
- Joined
- Jun 27, 2021
- Messages
- 26
I have a system which logs Absences for Individuals - Holiday, Sickness, etc. General layout below.
What I want to do is to show No of Absences taken for different absence types, this is done by using Absence Type Filter (see Green Filter Combo field top left).
Field Name: cmbAbsenceCode - Unbound Combo Field - 2 fields - 1. Primary Key and 2 Absence Descriptor.
Don't have any problems filtering the records into their respective Absence Codes, but DO have a problem showing Days Absence taken (see field Holidays Taken) it's throwing an error code #Error.
This field is a calculated unbound field (txtTaken) with embedded expression:
=Sum(IIf([binAuthorised]=-1 And [binCancel]=0 And [fkAbsenceCodeID]=[Forms]![frmAbsence]![cmbAbsenceCode].[Column](0),[numDays],0))
I know what is causing it (highlighted RED) because If I replace it with the Absence Code for Holidays value 13 it works!!
Form structure above is Main Form (frmPersonnel) with an embedded Sub Form (frmAbsence) which contains the Absence reporting system and expression shown above.
I think it is probably something to do with how I am referencing cmbAbsenceCode.
Any pointers on this one would be appreciated.
What I want to do is to show No of Absences taken for different absence types, this is done by using Absence Type Filter (see Green Filter Combo field top left).
Field Name: cmbAbsenceCode - Unbound Combo Field - 2 fields - 1. Primary Key and 2 Absence Descriptor.
Don't have any problems filtering the records into their respective Absence Codes, but DO have a problem showing Days Absence taken (see field Holidays Taken) it's throwing an error code #Error.
This field is a calculated unbound field (txtTaken) with embedded expression:
=Sum(IIf([binAuthorised]=-1 And [binCancel]=0 And [fkAbsenceCodeID]=[Forms]![frmAbsence]![cmbAbsenceCode].[Column](0),[numDays],0))
I know what is causing it (highlighted RED) because If I replace it with the Absence Code for Holidays value 13 it works!!
Form structure above is Main Form (frmPersonnel) with an embedded Sub Form (frmAbsence) which contains the Absence reporting system and expression shown above.
I think it is probably something to do with how I am referencing cmbAbsenceCode.
Any pointers on this one would be appreciated.