You can use the DLookup function in the BeforeUpdate event of each control to check for a duplicate. In real life however, many duplicates are allowed. A husband and wife will have the same address and phone number, and usually the same last name. Likewise a father and son can have the same name with a different suffix. There are also many duplicates of common names like "John Smith"
The better course of action is to identify several fields which, when combined, are unique. Then create a compound index and them and require it to be unique. To do that, open the Index dialog in the table's design view, give the index a name and add up to 10 fields. Make the index unique and save the table. -- Arvin Meyer, MCP, MVP Free MS-Access downloads: http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com
"rose" <rose[ at ]discussions.microsoft.com> wrote in message news:3AD04706-BC17-4AD0-AE20-7B04BD191030[ at ]microsoft.com...
[Quoted Text] >i have main from and employee form i need to create command buttonin the >main > from that when you click on it employee from but with new record and > taking > care of nothing dupplicate the old information > could you please help me with it
|