B
Ben
Hi all,
I created queries to show a certain list in the database over the network
but because it is a monster, it is slow and ruins the spirit of my users...
Yet, I need something like this... basically it shows which contacts have not
been contacted yet for a certain project... and I did it with 3 separate
queries that are linked to each other... Here they are:
Number1
SELECT [Läkare List].[First name], [Läkare List].[Last name], [Läkare
List].[Male/Female], [Läkare List].[Language ID], [Läkare List].specialisme,
[Läkare List].Phonenumber, [First name] & " " & [Last name] & " " &
Forms!SelectProjectforListtocall!Kombinationsruta0 AS Uttryck1, [Läkare
List].ID, [Läkare List].[Country ID], [Läkare List].Action, [Läkare
List].Actionby, [Läkare List].Actionforproject
FROM [Läkare List];
Number2
SELECT Called.Practician, Called.[Project ID], [Läkare List].[First name],
[Läkare List].[Last name], [First name] & " " & [Last name] & " " & [Project
ID] AS Uttryck1, Called.Called
FROM Called INNER JOIN [Läkare List] ON Called.Practician = [Läkare List].ID
WHERE (((Called.Called)=True));
And then to show and filter out the ones that users need to see, number 3:
SELECT [For list to call1].[First name], [For list to call1].[Last name],
[For list to call1].[Male/Female], [For list to call1].[Language ID], [For
list to call1].specialisme, [For list to call1].Phonenumber, [For list to
call1].Uttryck1, [For list to call2].Uttryck1, IIf([For list to
call1.Uttryck1]=[For list to call2.Uttryck1],No,Yes) AS Uttryck2, [For list
to call1].ID, Language.Language, Speciality.Speciality, [For list to
call1].[Country ID], [For list to call1].Action, [For list to
call1].Actionby, [For list to call1].Actionforproject
FROM (([For list to call1] LEFT JOIN [For list to call2] ON [For list to
call1].Uttryck1 = [For list to call2].Uttryck1) LEFT JOIN [Language] ON [For
list to call1].[Language ID] = Language.[Language ID]) LEFT JOIN Speciality
ON [For list to call1].specialisme = Speciality.SpecialityID
WHERE ((([For list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])) OR ((([For
list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta28]) Is Null)) OR
((([For list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])) OR ((([For
list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta28]) Is Null)) OR
(((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28]) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta13]) Is Null)) OR
(((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta28]) Is Null) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta13]) Is Null));
Please help !
Number1 and number2 will create a shared value which will then be compared
in number3 (a non-matching query)...
I created queries to show a certain list in the database over the network
but because it is a monster, it is slow and ruins the spirit of my users...
Yet, I need something like this... basically it shows which contacts have not
been contacted yet for a certain project... and I did it with 3 separate
queries that are linked to each other... Here they are:
Number1
SELECT [Läkare List].[First name], [Läkare List].[Last name], [Läkare
List].[Male/Female], [Läkare List].[Language ID], [Läkare List].specialisme,
[Läkare List].Phonenumber, [First name] & " " & [Last name] & " " &
Forms!SelectProjectforListtocall!Kombinationsruta0 AS Uttryck1, [Läkare
List].ID, [Läkare List].[Country ID], [Läkare List].Action, [Läkare
List].Actionby, [Läkare List].Actionforproject
FROM [Läkare List];
Number2
SELECT Called.Practician, Called.[Project ID], [Läkare List].[First name],
[Läkare List].[Last name], [First name] & " " & [Last name] & " " & [Project
ID] AS Uttryck1, Called.Called
FROM Called INNER JOIN [Läkare List] ON Called.Practician = [Läkare List].ID
WHERE (((Called.Called)=True));
And then to show and filter out the ones that users need to see, number 3:
SELECT [For list to call1].[First name], [For list to call1].[Last name],
[For list to call1].[Male/Female], [For list to call1].[Language ID], [For
list to call1].specialisme, [For list to call1].Phonenumber, [For list to
call1].Uttryck1, [For list to call2].Uttryck1, IIf([For list to
call1.Uttryck1]=[For list to call2.Uttryck1],No,Yes) AS Uttryck2, [For list
to call1].ID, Language.Language, Speciality.Speciality, [For list to
call1].[Country ID], [For list to call1].Action, [For list to
call1].Actionby, [For list to call1].Actionforproject
FROM (([For list to call1] LEFT JOIN [For list to call2] ON [For list to
call1].Uttryck1 = [For list to call2].Uttryck1) LEFT JOIN [Language] ON [For
list to call1].[Language ID] = Language.[Language ID]) LEFT JOIN Speciality
ON [For list to call1].specialisme = Speciality.SpecialityID
WHERE ((([For list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])) OR ((([For
list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta28]) Is Null)) OR
((([For list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])) OR ((([For
list to
call1].specialisme)=[Forms]![SelectProjectforListtocall]![Kombinationsruta13])
AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta28]) Is Null)) OR
(((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28]) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta13]) Is Null)) OR
(((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes))=Yes) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta28]) Is Null) AND
(([Forms]![SelectProjectforListtocall]![Kombinationsruta13]) Is Null));
Please help !
Number1 and number2 will create a shared value which will then be compared
in number3 (a non-matching query)...