#NAME? error

Z

zachnjoe

I have a control source in a text box. I've narrowed down the problem being
with the number, [MIN], I'm trying to pull and use from table [WPS Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
B

BruceM

Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you need
to do something like:
[Tables]![WPS Data]![FieldName]
 
Z

zachnjoe

I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part of
the form's record source so I have to call it out. I'm still getting the
error.

BruceM said:
Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you need
to do something like:
[Tables]![WPS Data]![FieldName]

zachnjoe said:
I have a control source in a text box. I've narrowed down the problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
W

Wayne-I-M

Are all the fields used in the formula numbers or dates ?
--
Wayne




zachnjoe said:
I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part of
the form's record source so I have to call it out. I'm still getting the
error.

BruceM said:
Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you need
to do something like:
[Tables]![WPS Data]![FieldName]

zachnjoe said:
I have a control source in a text box. I've narrowed down the problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
Z

zachnjoe

All are numbers.

Wayne-I-M said:
Are all the fields used in the formula numbers or dates ?
--
Wayne




zachnjoe said:
I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part of
the form's record source so I have to call it out. I'm still getting the
error.

BruceM said:
Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
B

BruceM

Did you try adding [Tables] in front of [WPS Data] as I suggested?

zachnjoe said:
I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part of
the form's record source so I have to call it out. I'm still getting the
error.

BruceM said:
Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you
need
to do something like:
[Tables]![WPS Data]![FieldName]

zachnjoe said:
I have a control source in a text box. I've narrowed down the problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS
Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
W

Wayne-I-M

#Name? Is shown when the control source (in this case the fields in the
formula) are either not longer available or are recognised -.

So you need to insert each field name again - make sure you are using the
field name (Correctly) and not the control source. If you have problems with
this you can always use the wizard (on the formula's record source click the
build option ... and use the builder).



--
Wayne




zachnjoe said:
All are numbers.

Wayne-I-M said:
Are all the fields used in the formula numbers or dates ?
--
Wayne




zachnjoe said:
I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part of
the form's record source so I have to call it out. I'm still getting the
error.

:

Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
Z

zachnjoe

I tried it with and without [Tables] and I'm still getting the same error.

The table [WPS Data] has multiple columns. The first column is [WPS]. Do I
need to reference [WPS] somehow so the control knows which row to pull the
[MIN PEN] value from?

BruceM said:
Did you try adding [Tables] in front of [WPS Data] as I suggested?

zachnjoe said:
I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part of
the form's record source so I have to call it out. I'm still getting the
error.

BruceM said:
Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of the
form's record source you do not need to specify the table (or whatever it
is). If it is not part of the form's record source then I believe you
need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS
Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
Z

zachnjoe

Didn't work. I used =[PEN] as a control source to test if [PEN] was the
problem and it wasn't. The problem is pulling [MIN PEN] out of a
multi-column table named[WPS Data].
 
B

BruceM

I have overlooked something. Which record from [WPS Data] do you want to
view? Can you add the [WPS Data] table to a record source query for your
form? You need to reference the field, but you also need to specify a
record. What is [MIN PEN]? Describe in plain English,what you are trying
to do.

zachnjoe said:
I tried it with and without [Tables] and I'm still getting the same error.

The table [WPS Data] has multiple columns. The first column is [WPS]. Do
I
need to reference [WPS] somehow so the control knows which row to pull the
[MIN PEN] value from?

BruceM said:
Did you try adding [Tables] in front of [WPS Data] as I suggested?

zachnjoe said:
I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part
of
the form's record source so I have to call it out. I'm still getting
the
error.

:

Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of
the
form's record source you do not need to specify the table (or whatever
it
is). If it is not part of the form's record source then I believe you
need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the
problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS
Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
W

Wayne-I-M

Almost all tables are multi-colum - ID, Product, Category, etc, etc

Can you let us have a few samples of the data held in [PEN] & [MIN]

Please just copy them rather than retyping (so we get the data "as is")

--
Wayne




zachnjoe said:
Didn't work. I used =[PEN] as a control source to test if [PEN] was the
problem and it wasn't. The problem is pulling [MIN PEN] out of a
multi-column table named[WPS Data].

Wayne-I-M said:
Try this

=IIf([TableName]![PEN]>[WPS Data]![MIN],1,0)

Insert the correct table name
 
Z

zachnjoe

Here's a shortened version of my table called [WPS Data]. [WPS] is selected
in a combo box on the form. I need to use the [MIN PEN] value associated
with the selected [WPS].

WPS MIN PEN MAX PEN
1A1457-LBW2A 0.01 0.03
1A6405-LBW1A 0.02 0.04
1A6405-LBW1B 0.01 0.03
1A6405-LBW1C 0.01 0.03
1A6405-LBW1D 0.01 0.02

BruceM said:
I have overlooked something. Which record from [WPS Data] do you want to
view? Can you add the [WPS Data] table to a record source query for your
form? You need to reference the field, but you also need to specify a
record. What is [MIN PEN]? Describe in plain English,what you are trying
to do.

zachnjoe said:
I tried it with and without [Tables] and I'm still getting the same error.

The table [WPS Data] has multiple columns. The first column is [WPS]. Do
I
need to reference [WPS] somehow so the control knows which row to pull the
[MIN PEN] value from?

BruceM said:
Did you try adding [Tables] in front of [WPS Data] as I suggested?

I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part
of
the form's record source so I have to call it out. I'm still getting
the
error.

:

Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of
the
form's record source you do not need to specify the table (or whatever
it
is). If it is not part of the form's record source then I believe you
need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the
problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS
Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
W

Wayne-I-M

Bruce would have (may already have) told you this but you need to bring the
Min Pen into the combo box. Set the coloums to 2 and use WPS and col 1 and
Min Pen as col 2.

Your formula should be

=IIf(([ComboName].[Column] 2)>[WPS Data]![MIN PEN],1,0)



zachnjoe said:
Here's a shortened version of my table called [WPS Data]. [WPS] is selected
in a combo box on the form. I need to use the [MIN PEN] value associated
with the selected [WPS].

WPS MIN PEN MAX PEN
1A1457-LBW2A 0.01 0.03
1A6405-LBW1A 0.02 0.04
1A6405-LBW1B 0.01 0.03
1A6405-LBW1C 0.01 0.03
1A6405-LBW1D 0.01 0.02

BruceM said:
I have overlooked something. Which record from [WPS Data] do you want to
view? Can you add the [WPS Data] table to a record source query for your
form? You need to reference the field, but you also need to specify a
record. What is [MIN PEN]? Describe in plain English,what you are trying
to do.

zachnjoe said:
I tried it with and without [Tables] and I'm still getting the same error.

The table [WPS Data] has multiple columns. The first column is [WPS]. Do
I
need to reference [WPS] somehow so the control knows which row to pull the
[MIN PEN] value from?

:

Did you try adding [Tables] in front of [WPS Data] as I suggested?

I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not part
of
the form's record source so I have to call it out. I'm still getting
the
error.

:

Another possibility besides what Wayne has mentioned: do controls and
fields have the same name? Also, what is WPS Data? If it is part of
the
form's record source you do not need to specify the table (or whatever
it
is). If it is not part of the form's record source then I believe you
need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the
problem
being
with the number, [MIN], I'm trying to pull and use from table [WPS
Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 
B

BruceM

If [PEN] is a field in the form's record source, you don't need to reference
the table. Also, column references in combo boxes are numbered from 0, so
the second column is 1. To add some detail to Wayne's posting, click the
three dots in the combo box property sheet and build a query based on [WPS
Data]. Include [WPS] and [MIN PEN]. Set the combo box column count to 2,
its bound column to 1, and its column widths to 1.5";0". You could also
build a named query of the same design, and use that as the row source. In
either case, set the control source of an unbound text box to:
=IIf([cboComboName].[Column](1) > [PEN],1,0)
This compares the field [PEN] in your form's record source with the second
column ([MIN PEN]) of the combo box row source, returning 1 or 0 as the case
may be.

Wayne-I-M said:
Bruce would have (may already have) told you this but you need to bring
the
Min Pen into the combo box. Set the coloums to 2 and use WPS and col 1
and
Min Pen as col 2.

Your formula should be

=IIf(([ComboName].[Column] 2)>[WPS Data]![PEN],1,0)
zachnjoe said:
Here's a shortened version of my table called [WPS Data]. [WPS] is
selected
in a combo box on the form. I need to use the [MIN PEN] value associated
with the selected [WPS].

WPS MIN PEN MAX PEN
1A1457-LBW2A 0.01 0.03
1A6405-LBW1A 0.02 0.04
1A6405-LBW1B 0.01 0.03
1A6405-LBW1C 0.01 0.03
1A6405-LBW1D 0.01 0.02

BruceM said:
I have overlooked something. Which record from [WPS Data] do you want
to
view? Can you add the [WPS Data] table to a record source query for
your
form? You need to reference the field, but you also need to specify a
record. What is [MIN PEN]? Describe in plain English,what you are
trying
to do.

I tried it with and without [Tables] and I'm still getting the same
error.

The table [WPS Data] has multiple columns. The first column is
[WPS]. Do
I
need to reference [WPS] somehow so the control knows which row to
pull the
[MIN PEN] value from?

:

Did you try adding [Tables] in front of [WPS Data] as I suggested?

I changed the name of the field from [MIN] to [MIN PEN].

=IIf([PEN]>[WPS Data]![MIN PEN],1,0). The table [WPS Data] is not
part
of
the form's record source so I have to call it out. I'm still
getting
the
error.

:

Another possibility besides what Wayne has mentioned: do
controls and
fields have the same name? Also, what is WPS Data? If it is
part of
the
form's record source you do not need to specify the table (or
whatever
it
is). If it is not part of the form's record source then I
believe you
need
to do something like:
[Tables]![WPS Data]![FieldName]

I have a control source in a text box. I've narrowed down the
problem
being
with the number, [MIN], I'm trying to pull and use from table
[WPS
Data].

=IIf([PEN]>[WPS Data]![MIN],1,0)
 

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