I have a database where a client can fill-out a form entering their username and date and record their visit to our career center.
Demographic information is stored in a separate table, is has FirstName, LastName, DOB, Last4 of Social, email, Address, and other contact info.
There is a parameter query setup, it has the following fields from two tables.
from table titled VisitDates it has UserName
From table titled ClientInformation it has First Name, Last Name, Birthdate
The criteria for LastName is [Enter Last Name] and the criteria for Birthdate is [Enter Date of Birth]
A form has been generated based on this query.
on opening the form, Access will prompt you to enter your Last Name and Date of Birth, if you information is found in the table the form will show Username, First, Last and DOB. I use this for people who have forgotten their username (last name + last 4 of social security number)
The problem is if i enter a last name and date of birth that is not found in the database, the system opens a form and rightfully displays no information. IS there a way to add some validation to the criteria so that if the last name and date of birth is not found in the table "ClientInformation" then it would msgbox an error message.
Not sure if this needs to be VB on the form fields or if this can be done in the query criteria.
any help would be appreicated.