Check for names in query when report is compiled (1 Viewer)

widemonk

Registered User.
Local time
Today, 03:48
Joined
Jun 16, 2005
Messages
48
I have a query that contains, among other things, the name of X people attending X event and another name (from the same table) who is to act as their 'in case of emergency' contact.

However, how can I check using VBA to make sure that the emergency contact isnt also attending the same event, which in turn sets the attributes of various labels on the report saying stuff like "emergency contact is attending this event, please select another".

Thanks in advance.
 

GohDiamond

"Access- Imagineer that!"
Local time
Yesterday, 22:48
Joined
Nov 1, 2006
Messages
550
It probably has something to do with Dlookup running the EmergencyContact field against the Attendees field. The problem is that I presume that the content has to match exactly; meaning the EmergencyContact would have to be entered as "Edward Jones" if the Attendee is entered as "Edward Jones" for it to match; but if you had some kind of unique identifier for each person, like a personal phone number, that would make the match exact; because you can control the way a phone number is entered using input mask.

Sorry I don't have the exact solution for you but I think this is where you'd start.

Goh
 

Users who are viewing this thread

Top Bottom