Rabu, 30 Maret 2016

[MS_AccessPros] Re: Defining property ownership

 

This is a case of garbage in/garbage out. If your users enter more than one owner per property match with no sold date you have to catch that as a validation rule violation. You could run a DLookup("*","tblPropOwner", "PropID=" & Me.txtPropID &  " And DateSold is Null")


Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.microsoft.com/en-us/PublicProfile/35852?fullName=Bill%20%20Mosca
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com



---In MS_Access_Professionals@yahoogroups.com, <jan.hertzsch@gmail.com> wrote :

I have a PROPERTY table and an OWNER table. I want to keep a history of who owned what property, when, and who is the current owner.

I was planning on using a third table with 4 fields. Property, Owner, Date Purchased, Date Sold. With the obvious relationships to the PROPERTY and OWNER tables. I had assumed a blank Date Sold field would allow me to indicate the current owner.  However, I want to make sure I don't have active two Property/Owner relationships.  That is, the same PROPERTY with an open Date Sold field for two owners.

I am not wedded to this design but I cannot think how I could do a validation for this on data entry.

This has to happen in databases all the time. How would you suggest I design or validate my way out of this? 

Thanks


 

__._,_.___

Posted by: wrmosca@comcast.net
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

.

__,_._,___

Tidak ada komentar:

Posting Komentar