I am a new user to access 2010. I encountered a puzzling problem in my form.
I designed the following form in which the top portion of the form, and is the clients basic information. For example, it contains:
First Name
Last Name
Address
City
State, zip
The above information is stored in a table called ClientInformation which has a key called ClientID. The key is 6 positions long and is unique for that table. The clientID is created by the user by using the first 4 letters of the last name and the first 2 letters of the first name
The bottom portion of the form is where the user enters the new clients family household members:
MemberFirstName
MemberLastName
Relationship
The household member information is stored in a separate table called HouseholdMembers, and is linked to the ClientInformation table using the same ClientID.
Now my problem.
The user enters the new client information by creating the ClientID field followed by the name and address data information I described above in the top portion of the form.
The user enters the ClientID data and tabs to the next field which is the clients LastName on the top portion of the form.
If a previous client has the same ClientID data(duplicate ClientID fields), the previous clients Household Memebers data appear in the bottom portion of the form as if this data belonged to the top potion new client.
Access does not alert the user of the duplicate key problem immediately. It only flags the dup key when the user tries to add the record to the ClientInformation table.
How do I alert the user that a duplicate key field is being entered immediately after he enters the key field data, when he tabs to the next field to enter the LastName?
I defined the clientID field in both tables as unique.
I do not know VB so it is difficult for me to try and catch this error.
I designed the following form in which the top portion of the form, and is the clients basic information. For example, it contains:
First Name
Last Name
Address
City
State, zip
The above information is stored in a table called ClientInformation which has a key called ClientID. The key is 6 positions long and is unique for that table. The clientID is created by the user by using the first 4 letters of the last name and the first 2 letters of the first name
The bottom portion of the form is where the user enters the new clients family household members:
MemberFirstName
MemberLastName
Relationship
The household member information is stored in a separate table called HouseholdMembers, and is linked to the ClientInformation table using the same ClientID.
Now my problem.
The user enters the new client information by creating the ClientID field followed by the name and address data information I described above in the top portion of the form.
The user enters the ClientID data and tabs to the next field which is the clients LastName on the top portion of the form.
If a previous client has the same ClientID data(duplicate ClientID fields), the previous clients Household Memebers data appear in the bottom portion of the form as if this data belonged to the top potion new client.
Access does not alert the user of the duplicate key problem immediately. It only flags the dup key when the user tries to add the record to the ClientInformation table.
How do I alert the user that a duplicate key field is being entered immediately after he enters the key field data, when he tabs to the next field to enter the LastName?
I defined the clientID field in both tables as unique.
I do not know VB so it is difficult for me to try and catch this error.