Error w/ "typed incorrectly, or is too complex" message.

G

Guest

I am having trouble with a query that keeps returning the error message "This
expression is typed incorreclt, or it is too complex to be evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the form loads
when the report runs, the query is populated based on the result from the
form, and the report displays the data. The problem is I keep throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is "[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need help...

-AZ
 
G

Guest

Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]" with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps
 
G

Guest

Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]") I return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City], Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State], Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City, Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State], Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


Ed said:
Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]" with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


AdamZ said:
I am having trouble with a query that keeps returning the error message "This
expression is typed incorreclt, or it is too complex to be evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the form loads
when the report runs, the query is populated based on the result from the
form, and the report displays the data. The problem is I keep throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is "[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need help...

-AZ
 
G

Guest

An update...

When I run the report, the form loads and I return an error after submitting
the form "Data type mismatch in criteria expression." When I try to run the
query on its own I return an error "Unknown."

In the "PSV" form the "ARYN" is a "value list" with "true";"false" for the
row source. "Agreement Received YN" in "Contacts" is a "true/false" field as
well.

Urg... I am so stumped.

-Adam

Adam said:
Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]") I return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City], Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State], Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City, Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State], Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


Ed said:
Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]" with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


AdamZ said:
I am having trouble with a query that keeps returning the error message "This
expression is typed incorreclt, or it is too complex to be evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the form loads
when the report runs, the query is populated based on the result from the
form, and the report displays the data. The problem is I keep throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is "[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need help...

-AZ
 
J

John Spencer

I suspect that your control on the form is returning the string "True" or
the string "False" instead of the value True(-1) or False(0). You might
consider using a checkbox instead of a combobox - that will return -1 or 0.

Try the following modification and see if the query runs. It is testing the
value in ARYN and if the string value is "True" is returning a True (-1) or
a False (0).

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE Contacts.[Packet Sent to Wholesaler YN]=True AND
Contacts.[Check Received YN]=True AND
Contacts.[Agreement Received YN]=([Forms]![PSV]![ARYN] = "True")

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City, Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


Adam said:
An update...

When I run the report, the form loads and I return an error after
submitting
the form "Data type mismatch in criteria expression." When I try to run
the
query on its own I return an error "Unknown."

In the "PSV" form the "ARYN" is a "value list" with "true";"false" for the
row source. "Agreement Received YN" in "Contacts" is a "true/false" field
as
well.

Urg... I am so stumped.

-Adam

Adam said:
Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]") I
return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


Ed said:
Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]"
with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


:

I am having trouble with a query that keeps returning the error
message "This
expression is typed incorreclt, or it is too complex to be
evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the form
loads
when the report runs, the query is populated based on the result from
the
form, and the report displays the data. The problem is I keep
throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements
Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is
"[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need
help...

-AZ
 
G

Guest

John,

Thanks for the prompt reply. With your SQL, when I run the query I get a
pop up field, "Forms!PSV!ARYN". If I type "true" it returns results.
Though, it returned results if I type "test" too.

Thoughts?
Adam

John Spencer said:
I suspect that your control on the form is returning the string "True" or
the string "False" instead of the value True(-1) or False(0). You might
consider using a checkbox instead of a combobox - that will return -1 or 0.

Try the following modification and see if the query runs. It is testing the
value in ARYN and if the string value is "True" is returning a True (-1) or
a False (0).

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE Contacts.[Packet Sent to Wholesaler YN]=True AND
Contacts.[Check Received YN]=True AND
Contacts.[Agreement Received YN]=([Forms]![PSV]![ARYN] = "True")

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City, Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


Adam said:
An update...

When I run the report, the form loads and I return an error after
submitting
the form "Data type mismatch in criteria expression." When I try to run
the
query on its own I return an error "Unknown."

In the "PSV" form the "ARYN" is a "value list" with "true";"false" for the
row source. "Agreement Received YN" in "Contacts" is a "true/false" field
as
well.

Urg... I am so stumped.

-Adam

Adam said:
Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]") I
return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


:

Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]"
with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


:

I am having trouble with a query that keeps returning the error
message "This
expression is typed incorreclt, or it is too complex to be
evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the form
loads
when the report runs, the query is populated based on the result from
the
form, and the report displays the data. The problem is I keep
throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements
Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is
"[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need
help...

-AZ
 
J

John Spencer

Is the form PSV open when you run the query? The form must be open before
the query runs.

If the form is open, then check the spelling of the form name and control
name in the query.

Hopefully, the results were different if you typed "Test" then if you typed
"True".


Adam said:
John,

Thanks for the prompt reply. With your SQL, when I run the query I get a
pop up field, "Forms!PSV!ARYN". If I type "true" it returns results.
Though, it returned results if I type "test" too.

Thoughts?
Adam

John Spencer said:
I suspect that your control on the form is returning the string "True" or
the string "False" instead of the value True(-1) or False(0). You might
consider using a checkbox instead of a combobox - that will return -1 or
0.

Try the following modification and see if the query runs. It is testing
the
value in ARYN and if the string value is "True" is returning a True (-1)
or
a False (0).

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE Contacts.[Packet Sent to Wholesaler YN]=True AND
Contacts.[Check Received YN]=True AND
Contacts.[Agreement Received YN]=([Forms]![PSV]![ARYN] = "True")

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


Adam said:
An update...

When I run the report, the form loads and I return an error after
submitting
the form "Data type mismatch in criteria expression." When I try to
run
the
query on its own I return an error "Unknown."

In the "PSV" form the "ARYN" is a "value list" with "true";"false" for
the
row source. "Agreement Received YN" in "Contacts" is a "true/false"
field
as
well.

Urg... I am so stumped.

-Adam

:

Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]") I
return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement
Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for
Allocation];


:

Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]"
with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


:

I am having trouble with a query that keeps returning the error
message "This
expression is typed incorreclt, or it is too complex to be
evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the
form
loads
when the report runs, the query is populated based on the result
from
the
form, and the report displays the data. The problem is I keep
throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements
Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is
"[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need
help...

-AZ
 
G

Guest

I capitalized the value in for "True" and "False" in PSV and for some reason
things seem to work now.

My code in the "where" section of the SQL is "Contacts.[Agreement Received
YN]=(Forms!PSV!ARYN="True") " ... though, I'm not really sure why the
results change when the PSV ARYN value changes if "True" is hardcoded in the
SQL.

It works, any idea why?

-Adam

John Spencer said:
Is the form PSV open when you run the query? The form must be open before
the query runs.

If the form is open, then check the spelling of the form name and control
name in the query.

Hopefully, the results were different if you typed "Test" then if you typed
"True".


Adam said:
John,

Thanks for the prompt reply. With your SQL, when I run the query I get a
pop up field, "Forms!PSV!ARYN". If I type "true" it returns results.
Though, it returned results if I type "test" too.

Thoughts?
Adam

John Spencer said:
I suspect that your control on the form is returning the string "True" or
the string "False" instead of the value True(-1) or False(0). You might
consider using a checkbox instead of a combobox - that will return -1 or
0.

Try the following modification and see if the query runs. It is testing
the
value in ARYN and if the string value is "True" is returning a True (-1)
or
a False (0).

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE Contacts.[Packet Sent to Wholesaler YN]=True AND
Contacts.[Check Received YN]=True AND
Contacts.[Agreement Received YN]=([Forms]![PSV]![ARYN] = "True")

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for Allocation];


An update...

When I run the report, the form loads and I return an error after
submitting
the form "Data type mismatch in criteria expression." When I try to
run
the
query on its own I return an error "Unknown."

In the "PSV" form the "ARYN" is a "value list" with "true";"false" for
the
row source. "Agreement Received YN" in "Contacts" is a "true/false"
field
as
well.

Urg... I am so stumped.

-Adam

:

Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]") I
return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement
Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for
Allocation];


:

Hi AZ,

To fix this problem just replace in you query "[Forms]![PSV]![ARYN]"
with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


:

I am having trouble with a query that keeps returning the error
message "This
expression is typed incorreclt, or it is too complex to be
evaluated." Any
help you can offer is more than appreciated as I am at a loss...

My setup is one query, one form, and one report. Ideally, the
form
loads
when the report runs, the query is populated based on the result
from
the
form, and the report displays the data. The problem is I keep
throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where "Agreements
Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is
"[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly need
help...

-AZ
 
J

John Spencer

It works because it's magic. ;-)

Seriously,
Contacts.[Agreement Received YN] is always going to be True or False

Forms!PSV!ARYN="True" is going to be TRUE when Forms!PSV!ARYN has the value
"True" (as a string) and false when Forms!PSV!ARYN has any other value


Adam said:
I capitalized the value in for "True" and "False" in PSV and for some
reason
things seem to work now.

My code in the "where" section of the SQL is "Contacts.[Agreement Received
YN]=(Forms!PSV!ARYN="True") " ... though, I'm not really sure why the
results change when the PSV ARYN value changes if "True" is hardcoded in
the
SQL.

It works, any idea why?

-Adam

John Spencer said:
Is the form PSV open when you run the query? The form must be open
before
the query runs.

If the form is open, then check the spelling of the form name and control
name in the query.

Hopefully, the results were different if you typed "Test" then if you
typed
"True".


Adam said:
John,

Thanks for the prompt reply. With your SQL, when I run the query I get
a
pop up field, "Forms!PSV!ARYN". If I type "true" it returns results.
Though, it returned results if I type "test" too.

Thoughts?
Adam

:

I suspect that your control on the form is returning the string "True"
or
the string "False" instead of the value True(-1) or False(0). You
might
consider using a checkbox instead of a combobox - that will return -1
or
0.

Try the following modification and see if the query runs. It is
testing
the
value in ARYN and if the string value is "True" is returning a True
(-1)
or
a False (0).

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for Allocation]

FROM Contacts
WHERE Contacts.[Packet Sent to Wholesaler YN]=True AND
Contacts.[Check Received YN]=True AND
Contacts.[Agreement Received YN]=([Forms]![PSV]![ARYN] = "True")

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for
Allocation];


An update...

When I run the report, the form loads and I return an error after
submitting
the form "Data type mismatch in criteria expression." When I try to
run
the
query on its own I return an error "Unknown."

In the "PSV" form the "ARYN" is a "value list" with "true";"false"
for
the
row source. "Agreement Received YN" in "Contacts" is a "true/false"
field
as
well.

Urg... I am so stumped.

-Adam

:

Hi Ed,

Thanks for the response. When I tried Eval("[Forms]![PSV]![ARYN]")
I
return
an error that says, "unknown". Any ideas?

Here is my query from the SQL view... (long, I know, sorry!)

SELECT Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.[City],
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[Employee], Contacts.[Payment for
Allocation]

FROM Contacts
WHERE (((Contacts.[Packet Sent to Wholesaler YN])=True) AND
((Contacts.[Check Received YN])=True) AND ((Contacts.[Agreement
Received
YN])=Eval("[Forms]![PSV]![ARYN]")))

GROUP BY Contacts.[Wholesaler ID], Contacts.[Wholesaler Name],
Contacts.[Packet Sent to Wholesaler Date], Contacts.City,
Contacts.[Product
Type], Contacts.[General Notes], Contacts.[Designated State],
Contacts.[Check
Received YN], Contacts.[AB Employee], Contacts.[Payment for
Allocation];


:

Hi AZ,

To fix this problem just replace in you query
"[Forms]![PSV]![ARYN]"
with
Eval("[Forms]![PSV]![ARYN]") and it should work.

I hope it helps

--
Regards,
Ed


:

I am having trouble with a query that keeps returning the error
message "This
expression is typed incorreclt, or it is too complex to be
evaluated." Any
help you can offer is more than appreciated as I am at a
loss...

My setup is one query, one form, and one report. Ideally, the
form
loads
when the report runs, the query is populated based on the
result
from
the
form, and the report displays the data. The problem is I keep
throwing an
error...

The DB Structure is as follows:
Form Name = "PSV"
Form's Field Name that Gets Passed= "ARYN"
Table Name = "Contacts"
Table Field Name = "Agreement Received" (a "true/false field")

I am trying to have the query return all results where
"Agreements
Received"
= "ARYN" (Note: The "ARYN" value is either "true" or "false").

The code in the "criteria" line of the query is
"[Forms]![PSV]![ARYN]"

I have no idea how to make this work. Any ideas? I clearly
need
help...

-AZ
 

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