A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Records "lost" when OLE added to RecordSource



 
 
Thread Tools Display Modes
  #1  
Old May 28th, 2004, 02:41 PM
JohnLute
external usenet poster
 
Posts: n/a
Default 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  
Old May 30th, 2004, 06:42 PM
Dirk Goldgar
external usenet poster
 
Posts: n/a
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:13 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.