hello
i have this sample database
How i can make sure after pressing save BTN the code will start form the beginning each time I press save BTN
to make sure the conditions will be applied
1234.accdb
hello
i have this sample database
How i can make sure after pressing save BTN the code will start form the beginning each time I press save BTN
to make sure the conditions will be applied
1234.accdb
Options:
1. set sage and sname as compound unique index in table design and duplicate pairs will not be allowed
2. code checks for existing record and prevents saving data if already exists
If DCount("", "tblTest", "sname='" & Me.sname & "' AND sage=" & Me.sage) > 0 Then
MsgBox "Record already exists."
Else
Normally, age is not saved, date of birth is saved and age is calculated.
Last edited by June7; 02-09-2023 at 06:36 PM.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.