This message serves for Google indexing. It only includes the first message of each thread from technical forums. To see the entire thread, the solutions and the technical content related to each message, you need to log in by going to the main page. This can be done at http://www.universalthread.com. If you do not have an account, we encourage you to create one now and start participating in Microsoft .NET and SQL Server related technology forums, just to name a few. Our database contains nearly two millions valuable high end technical messages. Thanks for the generous contribution to everyone who participated on the site so far, including MVP, Microsoft employees and many other well known contributors. The valuable content of the Universal Thread has created a history of 16 years of high end technical content which has helped many consultants, developers and many others in the industry on a daily basis. The site also offers a subscription option that greatly enhances your site experience.


View message
From15/07/1997 20:49:42
Mandy Mccord #011944
Public Interest Breakthroughs, Inc.
Albany, New York, United States
To  
All


Hi all! I'm back ;)!

I'm trying to create a local view and having some problems. I have 3 tables I want to include which are part of a many-to-many relationship

The tables are:
allcodes <--- contacts ---> person

The fields I want to display in my view are:
- allcodes.dispval for codetype='position'
.and. contacts.poscode=allcodes.codeno
- person.first,middle,last,phone,email for
person.persid=contacts.persid

I also want to filter only contacts.agencycode="1234" so only one agency's contacts display in a view (or can I link that filter to my form's data environment?)

The final view should look like this:
Position........First.......Middle Initial......Last.......Phone

In View Designer I can create the relation between Contacts and Person and even show only agency "1234" contacts. But when I try to link Allcodes.displayvalue to my position code in Contacts.dbf I'm getting 0 records in my view.

Oh, yeah, here's the sql that's screwing up:

SELECT Allcodes.dispval, Contacts.poscode, Person.first, Person.middlei,;
Person.last, Person.phone, Person.email;
FROM ird!contacts, ird!person, ird!allcodes;
WHERE Contacts.persid = Person.persid;
AND (Contacts.acode = "11000";
AND Contacts.poscode = Allcodes.codeno);
ORDER BY Contacts.poscode

Please help :)

Mandy