Query expression in a calculated field

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
 
J

Jeff Boyce

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
 
C

carrie08

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
 
K

KARL DEWEY

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
 
C

carrie08

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
 
C

carrie08

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.
 
K

KARL DEWEY

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
 
J

John Spencer

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
 
C

carrie08

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
 
K

KARL DEWEY

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
 
C

carrie08

I want my Membership Status field to equal Active if the MembershipStatus
field is equal to Active, and equal Not Active otherwise.
 
C

carrie08

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
 
J

Jeff Boyce

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
 
J

John Spencer

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
 
C

carrie08

Halelulu.....your second choice worked. Thanks so much. I'm sure I'll be
calling on you again.
 
C

carrie08

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
 

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