I created a monster

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)...
 
T

Tom Ellison

Dear Ben:

For purposes of my own study (and to illustrate what might be a better way
for you to see them as well) I have re-written the queries you provided,
with some notes.

Number1

SELECT [First name], [Last name], [Male/Female],
[Language ID], specialisme, Phonenumber,
[First name] & " " & [Last name] & " " &
Forms!SelectProjectforListtocall!Kombinationsruta0 AS Uttryck1,
ID, [Country ID], Action, Actionby, Actionforproject
FROM [Läkare List]

Notes: I have dropped all table qualifiers. There is only one table.

Number2

SELECT Called.Practician, C.[Project ID], L.[First name], L.[Last name],
L.[First name] & " " & L.[Last name] & " " & L.[Project ID] AS Uttryck1,
C.Called
FROM Called C
INNER JOIN [Läkare List] L
ON C.Practician = L.ID
WHERE C.Called = True

Notes: I have added aliases and qualified all column references. Are
[First Name], [Last Name], and [Project ID] all in [Läkare List]?

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);


In this line:

IIf([For list to call1.Uttryck1] = [For list to call2.Uttryck1],No,Yes)
AS Uttryck2,

there appears to be an error. It should almost certainly read:

IIf([For list to call1.Uttryck1] = [For list to
call2].[Uttryck1],No,Yes) AS Uttryck2,

Also, No and Yes are column names? If they are literals, then:

IIf([For list to call1.Uttryck1] = [For list to call2].[Uttryck1], "No",
"Yes") AS Uttryck2,

Similarly:

AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes)) = Yes)

may need to be:

AND ((IIf([For list to call1].[Uttryck1] = [For list to
call2].[Uttryck1], "No", "Yes")) = "Yes")

or just

AND [For list to call1].[Uttryck1] = [For list to call2].[Uttryck1]

Something similar is happening several more times.

If you would, please, take the edited queries I have used and refer to them
as we proceed. The way Access mangles the queries is a real mess, and
inhibits our communications and your understanding. Copy the queries I have
provided into text files using WordPad or an editor of your choice. Make
changes there and paste those into Access. This way, you can keep a nice,
clean, unmangled copy of your queries where you can begin any editing in the
future, and paste those into Access to test them.

Tom Ellison


Ben said:
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)...
 
B

Ben

Tom, Thanks for your input, has been helpfull so far and much more
convenient... here's my actions and questions

Number1

SELECT [First name], [Last name], [Male/Female],
[Language ID], specialisme, Phonenumber,
[First name] & " " & [Last name] & " " &
Forms!SelectProjectforListtocall!Kombinationsruta0 AS Uttryck1,
ID, [Country ID], Action, Actionby, Actionforproject
FROM [Läkare List]

Notes: I have dropped all table qualifiers. There is only one table.


Number2
SELECT C.Practician AS Uttryck2, C.[Project ID], L.[First name], L.[Last
name], [L].[First name] & " " & [L].[Last name] & " " & [c].[Project ID] AS
Uttryck1, C.Called
FROM Called AS C INNER JOIN [Läkare List] AS L ON C.Practician = L.ID
WHERE (((C.Called)=True));


Notes: I have added aliases and qualified all column references. Are
[First Name], [Last Name], and [Project ID] all in [Läkare List]?

Ben writes : No, [Project ID] is not in [Läkare List]. Läkare list is a table, Project is a table and calls is a table where you link the Record from Läkare list to the Record in Project. With [L].[First name] & " " & [L].[Last name] & " " & [c].[Project ID] in number1 and number2, I try to create a standard to filter out the matching ones…
With your code I was asked to fill out parameters on Called.Practician and
L.Project ID. So I changed it a little so that it would work as it does now.

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 (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])
AND ((IIf([For list to call1].[Uttryck1]=[For list to
call2].[Uttryck1],"No","Yes"))="Yes"))

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 (([For list to call1].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])
AND ((IIf([For list to call1].[Uttryck1]=[For list to
call2].[Uttryck1],"No","Yes"))="Yes"))

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].[Country
ID])=[Forms]![SelectProjectforListtocall]![Kombinationsruta28])
AND ((IIf([For list to call1.Uttryck1]=[For list to call2.Uttryck1],
"No","Yes"))="Yes")
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));

Now, with your help I made it look better, and more effective. Now, how to
increase the speed when you have 25000records… and more coming?

Ben’s question: Do you think that if I put the filters via those 3
Kombinationsruta on For list to call1, that it would increase the speed of
number3. Now those filters are on number3…
Any suggestions on how I can make this go faster and secure, cause if the
queries run, and you do other things, Access crashes sometimes..

Any suggestions ?

--
Novice


Tom Ellison said:
Dear Ben:

For purposes of my own study (and to illustrate what might be a better way
for you to see them as well) I have re-written the queries you provided,
with some notes.

Number1

SELECT [First name], [Last name], [Male/Female],
[Language ID], specialisme, Phonenumber,
[First name] & " " & [Last name] & " " &
Forms!SelectProjectforListtocall!Kombinationsruta0 AS Uttryck1,
ID, [Country ID], Action, Actionby, Actionforproject
FROM [Läkare List]

Notes: I have dropped all table qualifiers. There is only one table.

Number2

SELECT Called.Practician, C.[Project ID], L.[First name], L.[Last name],
L.[First name] & " " & L.[Last name] & " " & L.[Project ID] AS Uttryck1,
C.Called
FROM Called C
INNER JOIN [Läkare List] L
ON C.Practician = L.ID
WHERE C.Called = True

Notes: I have added aliases and qualified all column references. Are
[First Name], [Last Name], and [Project ID] all in [Läkare List]?

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);


In this line:

IIf([For list to call1.Uttryck1] = [For list to call2.Uttryck1],No,Yes)
AS Uttryck2,

there appears to be an error. It should almost certainly read:

IIf([For list to call1.Uttryck1] = [For list to
call2].[Uttryck1],No,Yes) AS Uttryck2,

Also, No and Yes are column names? If they are literals, then:

IIf([For list to call1.Uttryck1] = [For list to call2].[Uttryck1], "No",
"Yes") AS Uttryck2,

Similarly:

AND ((IIf([For list to call1.Uttryck1]=[For list to
call2.Uttryck1],No,Yes)) = Yes)

may need to be:

AND ((IIf([For list to call1].[Uttryck1] = [For list to
call2].[Uttryck1], "No", "Yes")) = "Yes")

or just

AND [For list to call1].[Uttryck1] = [For list to call2].[Uttryck1]

Something similar is happening several more times.

If you would, please, take the edited queries I have used and refer to them
as we proceed. The way Access mangles the queries is a real mess, and
inhibits our communications and your understanding. Copy the queries I have
provided into text files using WordPad or an editor of your choice. Make
changes there and paste those into Access. This way, you can keep a nice,
clean, unmangled copy of your queries where you can begin any editing in the
future, and paste those into Access to test them.

Tom Ellison


Ben said:
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)...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top