A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

#Error



 
 
Thread Tools Display Modes
  #1  
Old September 11th, 2007, 01:52 PM posted to microsoft.public.access.forms
Jahlu
external usenet poster
 
Posts: 15
Default #Error

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.
  #2  
Old September 11th, 2007, 02:54 PM posted to microsoft.public.access.forms
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default #Error

What is the data type of your field that is named Field 1?

--

Ken Snell
MS ACCESS MVP


"Jahlu" wrote in message
...
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.



  #3  
Old September 11th, 2007, 03:46 PM posted to microsoft.public.access.forms
Jahlu
external usenet poster
 
Posts: 15
Default #Error

text

"Ken Snell (MVP)" wrote:

What is the data type of your field that is named Field 1?

--

Ken Snell
MS ACCESS MVP


"Jahlu" wrote in message
...
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.




  #4  
Old September 11th, 2007, 05:48 PM posted to microsoft.public.access.forms
Ken Snell \(MVP\)
external usenet poster
 
Posts: 2,506
Default #Error

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" wrote in message
...
text

"Ken Snell (MVP)" wrote:

What is the data type of your field that is named Field 1?

--

Ken Snell
MS ACCESS MVP


"Jahlu" wrote in message
...
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.






  #5  
Old September 11th, 2007, 06:20 PM posted to microsoft.public.access.forms
Jahlu
external usenet poster
 
Posts: 15
Default #Error

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

"Ken Snell (MVP)" wrote:

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" wrote in message
...
text

"Ken Snell (MVP)" wrote:

What is the data type of your field that is named Field 1?

--

Ken Snell
MS ACCESS MVP


"Jahlu" wrote in message
...
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.






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:42 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.