S
sjw
I created a table [A] with a field [name] for persons name and a field
[closed] that contains the date the record was closed. I then created query
linked to this table in the design view and placed a combo box [cboName]
(from a form) in the criteria for [name]. Worked OK.
I wanted the query to return either 1) open records, 2) closed records, or
3) all records. So I created an option group with buttons Open, Closed, and
Both. I set a global variable [g_strStatus] = “Is Nullâ€, or “Is Not Nullâ€,
or “Is Null or Is Not Null†based on the result of the option group. I then
used a function [GetStatus()] to pass the value to the query. When I run the
query I get the “too complex†message.
If in the design view I type any of the choices, “Is Nullâ€, “Is Not Nullâ€,
or “Is Null or Is Not Null†in criteria for [closed] and then click the
DataSheet View, everything works as expected.
Sooo…
1. What am I missing?
2. Is there an easier way?
[closed] that contains the date the record was closed. I then created query
linked to this table in the design view and placed a combo box [cboName]
(from a form) in the criteria for [name]. Worked OK.
I wanted the query to return either 1) open records, 2) closed records, or
3) all records. So I created an option group with buttons Open, Closed, and
Both. I set a global variable [g_strStatus] = “Is Nullâ€, or “Is Not Nullâ€,
or “Is Null or Is Not Null†based on the result of the option group. I then
used a function [GetStatus()] to pass the value to the query. When I run the
query I get the “too complex†message.
If in the design view I type any of the choices, “Is Nullâ€, “Is Not Nullâ€,
or “Is Null or Is Not Null†in criteria for [closed] and then click the
DataSheet View, everything works as expected.
Sooo…
1. What am I missing?
2. Is there an easier way?