Minggu, 01 Januari 2017

Re: [MS_AccessPros] Limit Child Records to One per Parent Record

 

Well OK then! I did not know how to define a relationship 1:1, but when I made the PK of the second table the same as the PK of the first table and put them in the Relationship Window, Access defined the relationship as 1:1 for me and even set the Cascade Delete for me.

Thank you.


---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :

Then make the Primary Key of both tables the same and define a 1-1 relationship.

John Viescas, Author
Effective SQL
SQL Queries for Mere Mortals 
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications 
(Paris, France)




On Jan 1, 2017, at 6:24 AM, david.pratt@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:



I want to limit a child to one record per parent record.

child records are added in a subform with the main form based on the parent record.  

Can I place some code in the OnCurrent event of the subform that will prevent the creation of more than one child record per parent?





__._,_.___

Posted by: david.pratt@outlook.com
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)

Have you tried the highest rated email app?
With 4.5 stars in iTunes, the Yahoo Mail app is the highest rated email app on the market. What are you waiting for? Now you can access all your inboxes (Gmail, Outlook, AOL and more) in one place. Never delete an email again with 1000GB of free cloud storage.


.

__,_._,___

Tidak ada komentar:

Posting Komentar