Thanks both of you, removed recalcitrant field txtLeft, compacted, repaired and reinistigated.
Then came up with Error Message On Current, on investigation came across Me.txtLeft.Requery, smelled a little bit to me so removed (it wasn't really doing anything!) and it is now working OK.
A bit like a prize fighter slugging away at this one, getting a bit punch drunk so asking for assistance.
See attached screenshot:
If you look at Holidays Left (field txtLeft) it throwing the error message #Name?.
What this field should do is to generate Holidays Left based on a...
Thanks for both of those tips, I will do both.
Interestingly I found a different wrinkle on this as well, if you take the expression:
=Sum(IIf([binAuthorised]=-1 And [binCancel]=0 And [fkAbsenceCodeID]=[Forms]![frmPersonnel]![frmAbsence].Form![cmbAbsenceCode].[Column](0),[numDays],0)
and...
OK understand that but why doesn't [[Forms]![frmPersonnel]![frmAbsence].Form![cmbAbsenceCode].[Column](0) above work.
Clearly the expression structure is valid as evidenced by hardwiring in a value code 13, but doesn't if expression above is used, weird.
Is it because the summated field is in...
Nope just comes back with #Error.
However if I replace [[Forms]![frmPersonnel]![frmAbsence].Form![cmbAbsenceCode].[Column](0) with 13 which is the code for Holiday Absence it works perfectly so it is something to do with how cmbAbsenceCode is expressed.
Is...
numDays is a calculated field that is plugged into the underlying SQL Statement for the form see below.
numDays: IIf(([fkHoursID]=1 Or [fkHoursID]=2) And [binAuthorised]=-1 And [binCancel]=0,0.5,IIf([fkHoursID]=3 And [binAuthorised]=-1 And...
Somethings happening, I am now getting a different error message #Name? (see screenshot) . Researching this points to a circular reference but in both holidays taken and Holidays left field I don't see any circularity (is that a word?)
Field - txtTaken ...
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 -...
Many thanks for that it works a charm, did try something similar but didn't add Dim bolHandled As Boolean in the declaration section to make it available through-out the Form Module.
Two quick supplemental questions:
1. Am I better putting the variable bolHandled in the declaration section of a...
Can anybody throw any light onto the thread I have posted in VBA Express.
Duplication of Message Prompt (vbaexpress.com)
I think the logic in my code flies, but can't figure out the event behaviour that is occurring in the Change event when MsgBox command fires.
Need a another pair of eyes on...
Initially tried to put code between code tags, but came back with error message saying too large, hence PDF file.
With regards to point 1. you initially mentioned this point in a previous post and have worked through the code and found the specific line of code that was dirtying the record in 4...
As requested code for whole of module frmPersonnel. Will keep a weather eye for something dirtying the records.
File too big to fit between code tags (see attached file)