#Error

J

Jahlu

I am trying to use a switch function on my form that reads as follows...

=Switch([Field 1]="1","Yes",[Field 1]="2","No")

However, the results to this function always read...

#Error

I did some further testing and found that if I enter into my control source...

=[Field 1]

That I have the same problem; but, if I enter only the field name...

Field 1

My information is returned and I have no difficulty. I am thinking this may
be due to a missing reference in my Access library but I do not know which
one and am not sure how to add it. Thanks in advance for any suggestions or
assistance!

P.S. - I also have the same problem trying to use IIf functions on my forms.
 
J

Jahlu

text

Ken Snell (MVP) said:
What is the data type of your field that is named Field 1?

--

Ken Snell
<MS ACCESS MVP>


Jahlu said:
I am trying to use a switch function on my form that reads as follows...

=Switch([Field 1]="1","Yes",[Field 1]="2","No")

However, the results to this function always read...

#Error

I did some further testing and found that if I enter into my control
source...

=[Field 1]

That I have the same problem; but, if I enter only the field name...

Field 1

My information is returned and I have no difficulty. I am thinking this
may
be due to a missing reference in my Access library but I do not know which
one and am not sure how to add it. Thanks in advance for any suggestions
or
assistance!

P.S. - I also have the same problem trying to use IIf functions on my
forms.
 
K

Ken Snell \(MVP\)

What is the Name of the textbox whose Control Source contains the
expression? It needs to be a different name than Field 1.

--

Ken Snell
<MS ACCESS MVP>


Jahlu said:
text

Ken Snell (MVP) said:
What is the data type of your field that is named Field 1?

--

Ken Snell
<MS ACCESS MVP>


Jahlu said:
I am trying to use a switch function on my form that reads as follows...

=Switch([Field 1]="1","Yes",[Field 1]="2","No")

However, the results to this function always read...

#Error

I did some further testing and found that if I enter into my control
source...

=[Field 1]

That I have the same problem; but, if I enter only the field name...

Field 1

My information is returned and I have no difficulty. I am thinking this
may
be due to a missing reference in my Access library but I do not know
which
one and am not sure how to add it. Thanks in advance for any
suggestions
or
assistance!

P.S. - I also have the same problem trying to use IIf functions on my
forms.
 
J

Jahlu

Perfect! All I needed to do was rename the textbox. Thank you so much!

Ken Snell (MVP) said:
What is the Name of the textbox whose Control Source contains the
expression? It needs to be a different name than Field 1.

--

Ken Snell
<MS ACCESS MVP>


Jahlu said:
text

Ken Snell (MVP) said:
What is the data type of your field that is named Field 1?

--

Ken Snell
<MS ACCESS MVP>


I am trying to use a switch function on my form that reads as follows...

=Switch([Field 1]="1","Yes",[Field 1]="2","No")

However, the results to this function always read...

#Error

I did some further testing and found that if I enter into my control
source...

=[Field 1]

That I have the same problem; but, if I enter only the field name...

Field 1

My information is returned and I have no difficulty. I am thinking this
may
be due to a missing reference in my Access library but I do not know
which
one and am not sure how to add it. Thanks in advance for any
suggestions
or
assistance!

P.S. - I also have the same problem trying to use IIf functions on my
forms.
 
Top