Problem with AuditTrail

Just opened table tblUser_rechner and see a lot of "empty" User_ID which is confusing.

That can happen when there is a pc without a user assigned. In reality the pc would then be stored in our office untill we decide what to do. If there is no user there has to be something entered for "Verwendung" (I handled this with vba in my main Project, in the example i uploaded it's not relevant)

Where are records 8, 9 10?
They contained personal information so i deleted them before uploading the example.

Main and subform??
Again, this was related to my main project. The form in the example database I uploaded is a subform in my main project that is filtered if loaded. Should not be relevant to the current problem though.


I attached the current version of the example database.
 

Attachments

Based on you latest post, I see these facts. I added the link to Model which was an orphan.

There are many Computers (rechner)
There are Many Users
Each Computer has a designated Model
Each Computer has an defined Usage
A Usage(verwendung) may be 1)User/Office OR 2)Pool


Do ALL Users have an assigned Computer?

My feeling is that verwendung should be Joined to Rechner , not UserRechner, but I'm still trying to understand what you are trying to do.


Please review and update the facts.
 
Last edited:
Hello,

I reconsidered my data model and built a new one from scratch. Actually I did not need the extra table "tblUser_Rechner". Because I only Need to know the current user and not past (or future) users of a pc I can simply put the User_ID and Verwendung_ID in tblRechner. That also solves the Problem with the Audit Process as I can bind the Form to the tblRechner and with that everything works fine. Thank you very much for all the help!

I am still curious though, have you any ideas how to make this work with a m:n (many to many) relationship? For example if I want to see past users of the pc (that would be possible with the data model in the example database).
 
Last edited:
I reconsidered my data model and built a new one from scratch.

Please show us your new design/database.
I'd like to see the business facts/rules that you used in order to compare it with your design.

As for new thread ---that seems reasonable.
 
Hello,

I threw another example together. This time I included the search function I'm using and the audited form is now a subform as it is in my main Project. I still need to make adjustments to the code for using it in a subform but that is no problem, just didnt had the time yet.
Some of the code is commented in german as I simply copied it from my main project, if you want to know anything feel free to ask.

As for the data model I'll try to explain it simple.

There are many users/uses (Verwendung)
There are many PCs

One PC can have one user/usage
One user/usage can have many PCs

Thanks again for all the help!
 

Attachments

Glad you have it resolved.
 

Users who are viewing this thread

Back
Top Bottom