![]() |
|
|
#1
|
|||
|
|||
|
Hi all!!!
As a somewhat yet capable newbie I have a question on how to accomplish something... I have a table that is populated by numbers that are entered in a form. When the add process is taking place it first checks to see if the data that is trying to be added is already in the table and if it is it pops up an error message and won't let the data be added. What I need to further enhance this is for the duplicate info that is trying to be entered to be saved in another table along with displaying the error message so that the user knows it was a duplicate. Any thoughts? Thanks in advance for any and every one's help. |
|
#2
|
|||
|
|||
|
The short answer is no. Why would you want to anyway? If you want to know who added, changed or deleted records, why not have a log file? What is your code for trapping duplicates? Perhaps a message in that routine would be better.
|
|
#3
|
|||
|
|||
|
What I am trying to accomplish is this...
What I want to use Access for is to track entry to a limited access area utilizing a card swipe. The goal is to allow a person to gain admittance to this limited access area once per day. So I have everythign set up so far to record to a table the first time a person goes in to the area. If that person tries to go to the area again I want a message box to pop up to alert the person that is manning the entrance that the guest is accessing the lounge a second time in a given day. I have that part figured out as well. The part that I am having an issue figuring out is that along with alerting the person manning the entrance I want a list kept of the persons that tried to access the area multiple times in a given day in a seperate table. Thanks for any help!!! |
|
#4
|
|||
|
|||
|
You could do it the way you are doing it but I would suggest a better way thatis more scalable....
tbl_User UserId (PK) Fullname tbl_AccessLog AccessLogID (PK) UserId (FK) Denied (boolean) DateTime Code:
SELECT Count(AccessLogID ) as NumberOfAccesses FROM tbl_AccessLog WHERE UserId = 123 and denied = false and datetime=#01/09/2006# Code:
INSERT INTO tbl_AccessLog (UserId,Denied) VALUES (123,false) Code:
INSERT INTO tbl_AccessLog (UserId,Denied) VALUES (123,true) Hope that helps |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Duplicate command button | brettg | Database Design | 1 | 08-04-2008 02:16 AM |
| Which duplicate? | grgerhard | Import/Export Data | 1 | 05-27-2006 04:19 AM |
| duplicate autonumber | rayc | Access | 0 | 01-16-2006 06:57 AM |