Typing an adress in a form and verify if it exist in another form

C

Céline Brien

Hi,
One form for user without permit.
One form for user with permit.
If a user without permit takes a permit, a click on a button transfer the
user in the form for user with permit and destroy the user without permit.
But !
Sometimes a user with permit is created, and we realize to late that the
same user already existed in the form for user without permit.
I would like, after finishing to type the user address, using the form for
user with permit, to verify if the address already exist in the table for
user without permit.
In both form, the address is compose of three fields : number, apartment,
street. The merge of the three fields should form a unique key.
I already create a query QryAddressWithoutPermit creating the field
AddressWithoutPermit merging of the three fields.
Could an event after update of street field in the form for user with permit
compare the new address (merge of the three fields) with the
AddressWithoutPermit of the QryAddressWithoutPermit ?
Hope this is not to confusing.
Thank you for your help,
Céline
 
L

Linq Adams via AccessMonster.com

The standard approach to this would be:

Have a single table for users with/without permit

Use a unique key of the 3 address components, as stated. This will prevent
duplicates.

Have a checkbox field that is checked if the user has a permit

Set up your forms based on 2 queries with criteria

Criteria for the Without Permit Users: Checkbox = 0

Criteria for the With Permit Users: Checkbox = -1

--
There's ALWAYS more than one way to skin a cat!

Answers/posts based on Access 2000/2003

Message posted via AccessMonster.com
 
C

Céline Brien

Thank you for your answer.
I don't know if I can follow your advice.
The DateBase is already in use with multiple queries etc.
Any other suggestions ?
Céline
 
C

Céline Brien

Hi everybody,
I can't definitively follow that advice because the permits are automaticaly
numbered and the numbers have to be in order.
If there is always more than one way to skin a cat, maybe somebody else can
suggest another way to solve my problem.
Thank you for your help,
Céline
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top