Question 2 Questions: Stop rounding values and locking records

rjdonny

New member
Local time
Today, 17:35
Joined
Apr 21, 2014
Messages
2
Hi, I have 2 questions but anyone willing to help with either would be great.

1 - I need help with rounding values. I have a calculated Patient age data field. I've created an expression where the date of birth (separate date field) is subtracted from the surgery date (separate date field) and then the number of days calculated is divided by 365 to determine years of age at surgery. I then asked to have it expressed as an integer, which works great unless the patient is more than halfway to their next birthday, in which case it rounds UP. Can't figure out how to tell it how to always round down. ie...a 65.75 year old person gets calculated as 66 years old instead of 65. IF its really a pain to do, I could just make it a 2 decimal place field and accept a decimal answer, but I'd prefer straight integers.

2- Once a patient's record is complete and all surgical data has been recorded, I'd like to "Lock" that record so I can't screw it up at a later date. I don't need password protection, maybe just a on/off locking feature to "grey out" a record unless it is purposefully unlocked to update a file down the road.

Any answers would be greatly appreciated.
Ryan
 
UG
Thanks for the guidance, which I thought I understood at least on the date issue. From what I read, if my 2 fields are called DOB, and OR Date (surgery), then I think my expression should read

DateDiff("yyyy",[DOB],[OR Date])

Which I tried but when I goto save it I get a message telling me this expression cannot be used in a calculated column. Not sure what I'm missing here? I'm no Access pro, just a surgical person trying to track some surgical cases and compile some data. 99% of what I know abt Access I learned on Youtube, so feel free to make assumptions about my lack of knowledge on the topic.
 
That is only part of the formula needed , read the first thread all the way to understand why, R Hicks gives the complete formula, or one version of it.

Brian
 

Users who are viewing this thread

Back
Top Bottom