skrappySenior
Technical User
I am new to Access and VBA. I am learning the old-fashioned way of books with a candle in front of a fireplace....I have read many of the solutions regarding date formating and calculating. For me as a first time user they were too ambigous. I have documented below precise steps that I have learned.
Expressions in Forms - can be added to an unbound control
displays date as mm-dd-yyyy
displays the part of the current date by replacing the ?? with mm (2-day month), ww (2-digit week of the month 1-53) yy (2-digit year) or yyyy (4-digit year)
Below is a forumula, used to calculate age. The existing table field is called "dob". Added to the form was an unbound text box (right click and bring up properties) in the control source field (on the data or all tab) the following code was entered:
Expressions in Forms - can be added to an unbound control
Code:
[COLOR=blue]=date()[/color]
Code:
[COLOR=blue]=format(now(),"??")[/color]
Below is a forumula, used to calculate age. The existing table field is called "dob". Added to the form was an unbound text box (right click and bring up properties) in the control source field (on the data or all tab) the following code was entered:
Code:
[COLOR=blue]=Format(Now(),"yyyy")-Format([dob],"yyyy")[/color]