I have a table of ContactRoles that has only 2 relevant fields
cr_ContactId Relational field to Contact table
cr_Role Role name (Text)
The Roles are properties pertaining to contacts which cover a multitude of subjects like what classification the Contact belongs to (Tutor, Participant, B&B Operator etc.) and importantly for the stage I have reached their allergenic, dietary, health and B&B ‘special’ needs.
Sample ‘special’ needs Roles follow:
*NB&B* Needs ground floor room
All ‘special’ needs Roles follow the same format whereas other Roles are not capitalized and do not have leading and trailing ‘asters’.
When a participant is added as a booking on an event I would like to make a button visible that indicates where there are ‘special’ needs Roles to be considered for catering, B&B booking arrangements and/or for access difficulties (e.g. *HEALTH* Wheelchair bound).
I need a SQL statement that will be the Control Source of a Listbox and ascertain whether there is anything to alert the user to.
The Listbox will be part of a Pop-up form called by the button on the Events form that will appear in any record in tContactRoles that matches cr_ContactID and has a cr_Role containing ‘*A’, ‘*D’, ‘*H’ or ‘*N’
Do I do a quick check to see if I need to display the ‘Alert’ button or do I build the Alert form Listbox before I open the Alert form and then only make the Alert button visible if the Listbox row count > 0?
The first issue is how do I combine 4 'Like' elements in the WHERE statement?
SELECT tContactRole.cr_ContactId, tContactRole.cr_Role
WHERE (((tContactRole.cr_ContactId)=[Forms]![fJDWBooking]![jdwbMember]) AND ((tContactRole.cr_Role) Like '*A'));