# Read Me

Item Details:
This is the Membership table from the Chelmer Leisure Scenario.


Item Details:
This is the form as used in the CSCI1403 lecture, with a few changes.


Item Details:
The user enters a day (optional) and month (required) and the code will select members with a birthday on that exact day or month, or just in the required month.


Item Details:
There are validation conditions behind the day (txtDay) and month (txtMonth) fields on the form, set in the field property boxes. These fields are unbound controls.


Item Details:
There are three command buttons on the form, to demonstrate examples of showing the results as a query, a form, or as a label report.


Item Details:
The command buttons are set as disabled initially, and are only enabled (by VBA code) when the user enters a month. (Strictly-speaking, the code should also check to see that the month is then not removed - if it is, then the buttons should be disabled again).


Item Details:
This query is largely as used in the CSCI1403 lecture.


Item Details:
There is a simple test for equality with the value entered in the month field (txtMonth) on the Birthdays form. This uses the Forms Collection.


Item Details:
The test for the day value is not quite so simple, as we want two different things to happen here. If the user has left the day empty, then we want all day values to be selected (LIKE "*"). If the user has chosen a specific day, then we want to select just the records with the value as held in the day field (txtDay) on the Birthdays form. This also uses the Forms Collection. It also uses the IIF function, which has the following format: IIF(Expression, value if expression is true, value if expression is false). [Note that it is not possible to code ' Like forms!frmBirthdays!txtDay & "*" ' as that would pick up other days as well - if the user entered 1 for the day number, then 1, 10, 11, …, 18, 19 would also be selected].


Item Details:
This query will now (a) select all birthdays for a specific day and month, or (b) select all birthdays just for a specific month.


Item Details:
This is just a simple form created with the form wizard, using the Birthdays query as the source data.


Item Details:
VBA code behind the form sets appropriate values for the form header. The month value is converted to words using the MonthName Function. The rest of the form is as the wizard created it.


Item Details:
This is just to demonstrate that labels could be created if wished - perhaps the Chelmer Leisure management want to send out birthday cards to their members.


Item Details:
The postcode has been converted to Upper Case using the UCase function. This was added to the design view after creation by the Label Wizard.


