Prevent Duplicate entry in a month (1 Viewer)

USMAN55

New member
Local time
Today, 05:53
Joined
Jan 21, 2022
Messages
1
Hello

I have a database for pay pensions and i want to prevent duplicate entry in a month of each pension account
I.e i have account number 4124A and i want to create only one entry in a month.

how i create it.?

here is the form view i have use for transaction.
 

Attachments

  • form view.JPG
    form view.JPG
    39.5 KB · Views: 197

Pat Hartman

Super Moderator
Staff member
Local time
Yesterday, 20:53
Joined
Feb 19, 2002
Messages
43,257
You need to add a field to hold yyyy/mm, using a calculated field is best. Then you can make a unique index on Account + the ym field. To create a multi-field unique index, you must use the indexes dialog.
UniqueIDX4.JPG
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:53
Joined
Oct 29, 2018
Messages
21,467
Hi @USMAN55. Welcome to AWF!

You could also try using the BeforeUpdate event of your form to prevent duplicate entries.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:53
Joined
May 7, 2009
Messages
19,230
you can also add a button in your form that will open a Form
with the Last Transaction of the Account owner.
 

Attachments

  • pensionHouse.accdb
    608 KB · Views: 274

Users who are viewing this thread

Top Bottom