Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Create a copy of a record to hold

Status
Not open for further replies.

PharmaFun

Programmer
Jul 30, 2003
30
CA
Hello,

I wish to be able to edit an existing datasheet entry in a form, without creating duplicate entries. So I thought I would create a "Save" button where the old entry is copied, the old entry is then deleted, and the new entry plugged into its place.

Should I use the dbRepMakePartial command?

Thanks,
Dino
 
Dino

I guess there are several ways to do this ... but if your objective is to avoid duplicate entries, there may be a more simple way.

In the table design mode, you can set indexes for certain fields. Choose which field or fields you want to be unique and make sure their is an index and it is set to yes with no duplicates.

For more control on indexing, when in the design view, select the index button (lightening bolt to the right of a list). Enter an index name in the first column and select the appropriate field name for the second column. Set the index properties to unique and probably "no nulls". Then and a second field in the second column without creating another index name. This will force Access to ensure the tweo field together to be unique.

I think this is a better approach than to save a record before committing it.

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top