UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
2 Pages V < 1 2  (Go to first unread post)
   Reply to this topicStart new topic
> List Not Sorting Properly - Bound Combo Box, Access 2016    
 
   
tina t
post Dec 15 2019, 09:54 PM
Post#21



Posts: 6,453
Joined: 11-November 10
From: SoCal, USA


i never bother with Join Properties in the relationships window. i set them as i wish at the time i'm writing any given query. they don't affect the relationship itself.

in tblDailyRosterContractor.DailyRosterID, i'm guessing that the field's Indexed property is set to Yes (No Duplicates). that's necessary for a Primary Key field, of course. but if you set the Foreign Key field to No Duplicates, then only a one-to-one relationship can be supported. for a one-to-many relationship, the Foreign Key field's Indexed property must be set to Yes (Duplicates OK), in the table's Design view.

hth
tina
This post has been edited by tina t: Dec 15 2019, 09:58 PM

--------------------
"the wheel never stops turning"
Go to the top of the page
 
FrankRuperto
post Dec 15 2019, 10:09 PM
Post#22



Posts: 806
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


That was the problem, thanks Tina thumbup.gif

Attached File  one_to_many.PNG ( 12.49K )Number of downloads: 5


UPDATE: Now I have no idea on how to get rid of the 1st image, geez
This post has been edited by FrankRuperto: Dec 15 2019, 10:18 PM
Attached File(s)
Attached File  one_to_many.PNG ( 9.97K )Number of downloads: 4
 

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
FrankRuperto
post Dec 15 2019, 11:53 PM
Post#23



Posts: 806
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


To Mods, Can you please delete the 1st image in my previous post?
Thanks in advance uarulez2.gif


Attached File(s)
Attached File  cbo.PNG ( 25.53K )Number of downloads: 0
 

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
tina t
post Dec 16 2019, 12:09 AM
Post#24



Posts: 6,453
Joined: 11-November 10
From: SoCal, USA


hi Frank, the second image in your next-to-last post shows that Referential Integrity is not enforced between the ContractorID fields in the parent/child tables.

the first image in the same post shows there was a one-to-one relationship between the ContractorID fields inthe parent/child tables.

i'm guessing that the Indexed property of tblDailyRosterContractor.ContractorID is set to Yes (No Duplicates), just as the other foreign key field was. once you change it to Yes (Duplicates OK), then you'll be able to enforce referential integrity between the linked fields, just as you did with the PK/FK link on field DailyRosterID.

hth
tina

--------------------
"the wheel never stops turning"
Go to the top of the page
 
FrankRuperto
post Dec 16 2019, 12:43 AM
Post#25



Posts: 806
Joined: 21-September 14
From: (MilitaryBrat) Tampa Bay, Florida, USA


Hi Tina, I did have tblDailyRosterContractor.ContractorID set to Yes (Duplicates OK), but the RI was unchecked. Thanks again for the heads up thumbup.gif
This post has been edited by FrankRuperto: Dec 16 2019, 12:45 AM
Attached File(s)
Attached File  one_to_many.PNG ( 10.07K )Number of downloads: 4
 

--------------------
Currently supporting pawnbrokers that use my store management system developed with Access 2010 on Windows7. Experienced with Informix, Oracle & PostgreSQL db's.
Go to the top of the page
 
isladogs
post Dec 16 2019, 02:47 AM
Post#26


UtterAccess VIP
Posts: 2,243
Joined: 4-June 18
From: Somerset, UK


As already stated, the main purpose of relationships is to apply referential integrity.
I have an extended 3 part article on my website Relationships and Referential Intrgrity which you may find useful.
It covers different types of relationship, the purpose of different types of join, what RI does etc.
It also covers subdatasheets (which I don't recommend) and the final part explains how Access stores relationship info in a system table MSysRelationships.

It is a companion to 2 other articles Query Join Types and How Access Stores Queries. The latter covers the MSysQueries table in detail

Query joins set in queries can indeed override those set in the relationships window.
However there is still a purpose in specifying the type of join in the relationship window as that determines what data can be stored.
By comparison, query joins determine the data that is displayed by the query

Frank
If you can still edit your earlier post, click manage attachments and delete the first image by clicking the red X icon

--------------------
Colin (Mendip Data Systems)
Website, email
Go to the top of the page
 
tina t
post Dec 16 2019, 02:38 PM
Post#27



Posts: 6,453
Joined: 11-November 10
From: SoCal, USA


no problem, Frank, have a great day. :) tina

--------------------
"the wheel never stops turning"
Go to the top of the page
 
2 Pages V < 1 2


Custom Search


RSSSearch   Top   Lo-Fi    5th April 2020 - 01:56 AM