Query expression in a calculated field

  • Thread starter Thread starter carrie08
  • Start date Start date
C

carrie08

HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not Active],
false)

kae
 
Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP
 
I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


Jeff Boyce said:
Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

carrie08 said:
HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not Active")

--
Build a little, test a little.


carrie08 said:
I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


Jeff Boyce said:
Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

carrie08 said:
HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
I received an "Error" message down my column.
--
kae


KARL DEWEY said:
Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not Active")

--
Build a little, test a little.


carrie08 said:
I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


Jeff Boyce said:
Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
No, the field is Active, Not Active, On Hold.
--
kae


PieterLinden via AccessMonster.com said:
carrie08 said:
I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
Your expression tells Access to look for a field named "Active" and another
one named "Not Active".
[quoted text clipped - 17 lines]

Try this:
MonthlyFeeStatus: =IIF([MembershipStatus], "Active", "Not Active")

This will only work if [MembershipStatus] is a yes/no field.
 
What kind of field is [MembershipStatus], what is the DataType?

Do you have 3 fields named [MembershipStatus], [Active], and [Not Active]?
Post sample data from each field.


--
Build a little, test a little.


carrie08 said:
I received an "Error" message down my column.
--
kae


KARL DEWEY said:
Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not Active")

--
Build a little, test a little.


carrie08 said:
I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


:

Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
So the values in the field are Active, Not Active, or On Hold.

IIF(MembershipStatus="Active",True, False)

Or maybe you want
IIF(MembershipStatus="Active","Active", "Not Active")

Or perhaps you want something else. Your question is not very clear.


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
The Membership Status column field have three choices: members are either,
Active, Inactive, or On Hold.
--
kae


KARL DEWEY said:
What kind of field is [MembershipStatus], what is the DataType?

Do you have 3 fields named [MembershipStatus], [Active], and [Not Active]?
Post sample data from each field.


--
Build a little, test a little.


carrie08 said:
I received an "Error" message down my column.
--
kae


KARL DEWEY said:
Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not Active")

--
Build a little, test a little.


:

I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


:

Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
Ok. Fill in the blank below for what you want the results to be for each
possibility --
Active ___________
Inactive __________
On Hold __________

The blank represents what MonthlyFeeStatus would display --
MonthlyFeeStatus: ________


--
Build a little, test a little.


carrie08 said:
The Membership Status column field have three choices: members are either,
Active, Inactive, or On Hold.
--
kae


KARL DEWEY said:
What kind of field is [MembershipStatus], what is the DataType?

Do you have 3 fields named [MembershipStatus], [Active], and [Not Active]?
Post sample data from each field.


--
Build a little, test a little.


carrie08 said:
I received an "Error" message down my column.
--
kae


:

Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not Active")

--
Build a little, test a little.


:

I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


:

Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
I want my Membership Status field to equal Active if the MembershipStatus
field is equal to Active, and equal Not Active otherwise.
 
I only want to see the Active and the Inactive(which will be displayed as Not
Active)
--
kae


KARL DEWEY said:
Ok. Fill in the blank below for what you want the results to be for each
possibility --
Active ___Active________
Inactive ____Not Active______
On Hold ___is not displayed_______

The blank represents what MonthlyFeeStatus would display --
MonthlyFeeStatus: ________


--
Build a little, test a little.


carrie08 said:
The Membership Status column field have three choices: members are either,
Active, Inactive, or On Hold.
--
kae


KARL DEWEY said:
What kind of field is [MembershipStatus], what is the DataType?

Do you have 3 fields named [MembershipStatus], [Active], and [Not Active]?
Post sample data from each field.


--
Build a little, test a little.


:

I received an "Error" message down my column.
--
kae


:

Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not Active")

--
Build a little, test a little.


:

I am still receiving an Error message telling me that my expression entered
contain a wrong number of arguments.
--
kae


:

Your expression tells Access to look for a field named "Active" and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays all members
that, equals Active if the memberships field is active and not active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true, [Not
Active],
false)

kae
 
Any chance your underlying table uses a "lookup" data type for that field?

Regards

Jeff Boyce
Microsoft Access MVP


carrie08 said:
The Membership Status column field have three choices: members are either,
Active, Inactive, or On Hold.
--
kae


KARL DEWEY said:
What kind of field is [MembershipStatus], what is the DataType?

Do you have 3 fields named [MembershipStatus], [Active], and [Not
Active]?
Post sample data from each field.


--
Build a little, test a little.


carrie08 said:
I received an "Error" message down my column.
--
kae


:

Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not
Active")

--
Build a little, test a little.


:

I am still receiving an Error message telling me that my expression
entered
contain a wrong number of arguments.
--
kae


:

Your expression tells Access to look for a field named "Active"
and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as
shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays
all members
that, equals Active if the memberships field is active and not
active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true,
[Not
Active],
false)

kae
 
So try the second option as a calculated field in your query.

Field: Status: IIF(MembershipStatus="Active","Active","Not Active")

John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Halelulu.....your second choice worked. Thanks so much. I'm sure I'll be
calling on you again.
 
Thanks for your response. Mr. Spencer's answer solved my problem. Oh, how I
appreciated this Community Board.
--
kae


Jeff Boyce said:
Any chance your underlying table uses a "lookup" data type for that field?

Regards

Jeff Boyce
Microsoft Access MVP


carrie08 said:
The Membership Status column field have three choices: members are either,
Active, Inactive, or On Hold.
--
kae


KARL DEWEY said:
What kind of field is [MembershipStatus], what is the DataType?

Do you have 3 fields named [MembershipStatus], [Active], and [Not
Active]?
Post sample data from each field.


--
Build a little, test a little.


:

I received an "Error" message down my column.
--
kae


:

Try this --
MonthlyFeeStatus: =IIF([MembershipStatus] = -1, "Active", "Not
Active")

--
Build a little, test a little.


:

I am still receiving an Error message telling me that my expression
entered
contain a wrong number of arguments.
--
kae


:

Your expression tells Access to look for a field named "Active"
and another
one named "Not Active".

I believe you want to use quotes around those, rather than, as
shown in your
example below, square brackets.

Regards

Jeff Boyce
Microsoft Access MVP

HELP!!!!
Nothing is working for me. I need an expression that displays
all members
that, equals Active if the memberships field is active and not
active if
the
membership field is not active. I've tried:
-- MonthlyFeeStatus: =IIF([MembershipStatus], [Active], true,
[Not
Active],
false)

kae
 
Back
Top