How do I add new information but ensure at most 1 record exits

General Ledger

Active Member
Joined
Dec 31, 2007
Messages
460
Deear All,

I am a self taught (and not very well) user of Access 2007.

I have a table that must contian unique records based on some key fields (item number and purchase order number). The table includes an AutoNumber field that adds a sequential record number. This can tell me the sequence in which new records were added. I can also determine which record is older or newer.

I need to manually enter new records from time to time. At the end, I need to be sure the table only has the late record entered for each combination of item number and purchase order number.

I am thinking there are a few approaches:

1. Create an entry form that somehow checks as I enter new data, whether a record already exits in the table with a match on the item number and purchase order number, deletes the old record, and appends the new record.

2. Create an entry form that somehow checks whether a record already exits in the table with a match on the item number and purchase order number, and updates some fields in the existing record.

3. Create an entry form that appends all the new records I enter. Then run a Find Duplicate Records query that identifies all duplicate records based on item number and purchase order number. Somehow delete all the records except the one with the highest AutoNumber (the last one entered) as grouped by item number and purchase order number.

Any ideas or full blown solutions are gratefully appreciated!!

Please be detailed and explicit as I am at best a rookie.

Thank you,

General Ledger (on the Jersey Shore)
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
Hi GL

Create a primary Key field in your table to contain the unique identifier of each record. A concatenation of item number and PO no. This will ensure the table only ever contains unique items

Click on the tablename and choose 'create' and 'form' from the menu. You now have a form in which you can edit existing Purchase order details or add new ones.
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,144
Members
449,294
Latest member
Jitesh_Sharma

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top