Many thanks Yarbrough40,
I'm a beginner in this kind of thing.
That's exactly what I needed, just the other way round ASN = non-devolved
Your a star, cheers
Jac
User Profile
Collapse
-
JacD started a topic How to display a note in Txtbox2 depending on the result in Txtbox1 in Access report?in Visual BasicHow to display a note in Txtbox2 depending on the result in Txtbox1 in Access report?
I have a report in MS Access which shows Base Types in a textbox. Depending on the result in that textbox, I want another textbox to show a word.
eg. Base types are in a text box named BaseType
The word I want to add should show in text box named NonDev
If the result of BaseType textbox is ASN then show Non-Devolved in the NonDev textbox. Any other result in BaseType textbox should leave the NonDev textbox... -
Thanks. Looks much easier to read. That's what happens when you are more of a letter writer than a Code writer, it's hard not to left align everything!
Still puzzling how to overcome this. Had hoped that txtEligible would update in all records depending on the DOB of each record....Leave a comment:
-
I managed to add a bit to your code and it is now working exactly as I need it.
Private Sub DOB_AfterUpdate ()
Dim dte16th As Date
'Must contain some Value and it must be a Date
If IsNull(Me![DOB]) Or Not IsDate(Me![DOB]) Then Exit Sub
dte16th = DateAdd("yyyy", 16, CDate(Me![DOB]))
If dte16th >= DateSerial(Year (dte16th), 3, 1) And _
dte16th...Leave a comment:
-
Your almost there, it's looking very promising though. It's working fine for pupils who leave on 31st May.
The problem is with the December leaving date -
Else
Me![txtEligible] = DateSerial(Year (dte16th) - 1, 12, 31)
It needs split up further as only those with a birthday between 1st Jan and 29th Feb would be allowed to leave the year before they are 16 years old (on 31st December)
...Leave a comment:
-
Thank you for your input and quick response.
I need it to be able to show leaving dates no matter what age they are at present.
So even if their DOB is 10th February 2000 (currently aged 8), I want it to show their expected leaving date in years to come when they do reach 16 between the dates mentioned, if that makes sense.
DOB = 10th February 2000
Expected Leaving Date to show as - 31st December...Leave a comment:
-
School Leaving Date - depending on age between dates
I have an access database (MS Access 2002,) which stores school pupils information and I have very limited knowledge on VBA. Hopefully someone can help solve this one for me.
I have a form named frmPupils which contains the Date of Birth (field name - DOB).
I want to add a textbox to the form which will display a date that the pupil is
elegible to leave school, which is dependant on what is entered in...
No activity results to display
Show More
Leave a comment: