Help With Access Form: Age / 'Blacking out' boxes?

floridaboy2004

New Member
Joined
Nov 17, 2004
Messages
44
Hello all,

I have a question...

I am setting up a marketing database but I want focus on individuals over the age of 45 years of age (I don't want to send out to people 45 years or younger).

Is there a way in Access that when a Date of Birth is entered into an Access form that would determine their age as of the date that they made a purchase in my store (e.g. bought a hat on 6/1/04, data entered on 9/30/04), and if their age was 45 years or less at the time of purchase, the rest of the form would essentially 'black itself out,' e.g. freeze or lock-up the remainder of the data entry fields on the form?

Thanks again, all!
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
Floridaboy,
You will need to setup an text field with the following formula as the data source.

=datediff("d",[birthDate],[purchaseDate])/365.25

This will give you the approximate age, taking into account leap years.

You can then program the change event on your entry fields to lock the remaining fields based on the results of this textbox.

HTH
Cal
 
Upvote 0
Hello Cbrine...

WHERE should enter the formula listed above? Should that be under 'properties in the design view of the relevant Form? If so, where would I enter this formula (I assume the data source field) Or would this need to be setup in a design view elsewhere?

Also, WHERE would I go program the change event based on the entry fields to lock the remaining fields based on their age being 45 years or less (e.g. Tables: Design, Forms: Design, etc.)?

How do I SPECIFY which boxes to 'black out' after the AGE field comes up as 45 or under? For example, I may still want to mail out letters for offers on college loans but NOT on hair loss treatment...and therefore would not need to fill a 'haircolor' field since I would not contact them about hair loss treatment...

Thank-you SO much, Cbrine (and any other kind soul willing to offer advice)...your assistance and expertise is much appreciated!

Many thanks! :)
 
Upvote 0

Forum statistics

Threads
1,221,829
Messages
6,162,229
Members
451,756
Latest member
tommyw

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top