If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Records "lost" when OLE added to RecordSource
This is my form's RecordSource (it works fine):
SELECT tblProfiles.txtProfileID, tblProfiles.Version, tblProfiles.Type, tblProfiles.Description, tblProfiles.SKUSCCITF, tblProfiles.UPCUCCEAN, tblProfiles.OriginDate, tblProfiles.ApprovedDate, tblProfiles.ActiveDate, tblProfiles.InactiveDate, tblProfiles.RevisedDate, tblProfiles.RevisionHistory, tblProfiles.AllergenComments FROM tblProfiles WHERE (((tblProfiles.Type)="CP")); Here it is with an OLE object field added. Now when I open the form, none of the records show. SELECT tblProfiles.txtProfileID, tblProfiles.Version, tblProfiles.Type, tblProfiles.Description, tblProfiles.SKUSCCITF, tblProfiles.UPCUCCEAN, tblProfiles.OriginDate, tblProfiles.ApprovedDate, tblProfiles.ActiveDate, tblProfiles.InactiveDate, tblProfiles.RevisedDate, tblProfiles.RevisionHistory, tblProfiles.AllergenComments, tblCPPhysicalAttributes.OLECupLidImage FROM tblProfiles INNER JOIN tblCPPhysicalAttributes ON tblProfiles.txtProfileID=tblCPPhysicalAttributes.t xtProfileID WHERE (((tblProfiles.Type)="CP")); Why would adding the OLE field to the RecordSource do this? How can I resolve it? Thanks! |
#2
|
|||
|
|||
Records "lost" when OLE added to RecordSource
"JohnLute" wrote in message
This is my form's RecordSource (it works fine): SELECT tblProfiles.txtProfileID, tblProfiles.Version, tblProfiles.Type, tblProfiles.Description, tblProfiles.SKUSCCITF, tblProfiles.UPCUCCEAN, tblProfiles.OriginDate, tblProfiles.ApprovedDate, tblProfiles.ActiveDate, tblProfiles.InactiveDate, tblProfiles.RevisedDate, tblProfiles.RevisionHistory, tblProfiles.AllergenComments FROM tblProfiles WHERE (((tblProfiles.Type)="CP")); Here it is with an OLE object field added. Now when I open the form, none of the records show. SELECT tblProfiles.txtProfileID, tblProfiles.Version, tblProfiles.Type, tblProfiles.Description, tblProfiles.SKUSCCITF, tblProfiles.UPCUCCEAN, tblProfiles.OriginDate, tblProfiles.ApprovedDate, tblProfiles.ActiveDate, tblProfiles.InactiveDate, tblProfiles.RevisedDate, tblProfiles.RevisionHistory, tblProfiles.AllergenComments, tblCPPhysicalAttributes.OLECupLidImage FROM tblProfiles INNER JOIN tblCPPhysicalAttributes ON tblProfiles.txtProfileID=tblCPPhysicalAttributes.t xtProfileID WHERE (((tblProfiles.Type)="CP")); Why would adding the OLE field to the RecordSource do this? How can I resolve it? Thanks! I doubt that the problem has anything to do with the OLE field itself. But you've changed the recordsource query from a single-table query to one that inner joins two tables. That means that the query will only return records that have a match in both tables on the join field (txtProfileID) -- that's the definition of an inner join. Are you saying that you have matching records in both tblProfiles and tblCPPhysicalAttributes, and the query still doesn't return any records? That would be a matter for concern. But if your tblCPPhysicalAttributes is empty or contains no records that match the CP records in tblProfiles, then what you're seeing is expected. If you want to see all the records from tblProfiles with type "CP", regardless of whether they have matching records in tblCPPhysicalAttributes, then change "INNER JOIN" to "LEFT JOIN" in the query SQL. -- Dirk Goldgar, MS Access MVP www.datagnostics.com (please reply to the newsgroup) |
Thread Tools | |
Display Modes | |
|
|