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  

#Name? error message



 
 
Thread Tools Display Modes
  #1  
Old October 26th, 2009, 06:28 PM posted to microsoft.public.access.forms
TC2004
external usenet poster
 
Posts: 38
Default #Name? error message

I added an unbound text box to my form and the following expression. When I
go back to Form View I get the following error message: #Name?

Here is the expression:

=IIf((IIf([tbl_Demographics]![dtDateReConsented] Is
Null,[tbl_Demographics]![dtDateFirstConsented],[tbl_Demographics]![dtDateReConsented]))#4/17/2009#,(IIf([tbl_Demographics]![dtDateReConsented]
Is
Null,[tbl_Demographics]![dtDateFirstConsented],[tbl_Demographics]![dtDateReConsented]))+5*365,(IIf([tbl_Demographics]![dtDateReConsented]
Is
Null,[tbl_Demographics]![dtDateFirstConsented],[tbl_Demographics]![dtDateReConsented]))+10*365)

I originally had this in a query and it worked just fine there, but copying
the code to the form did not work. What is going on?

Thanks.
  #2  
Old October 26th, 2009, 09:36 PM posted to microsoft.public.access.forms
KARL DEWEY
external usenet poster
 
Posts: 10,767
Default #Name? error message

I can not follow the logic of these IIF statements --
=IIf((IIf([tbl_Demographics]![dtDateReConsented] Is Null,
[tbl_Demographics]![dtDateFirstConsented],
[tbl_Demographics]![dtDateReConsented])) #4/17/2009#,
(IIf([tbl_Demographics]![dtDateReConsented] .....

This is saying if dtDateReConsented is null test dtDateFirstConsented but
there is no test criteria.

Can you verbalize the process?

--
Build a little, test a little.


"tc2004" wrote:

I added an unbound text box to my form and the following expression. When I
go back to Form View I get the following error message: #Name?

Here is the expression:

=IIf((IIf([tbl_Demographics]![dtDateReConsented] Is
Null,[tbl_Demographics]![dtDateFirstConsented],[tbl_Demographics]![dtDateReConsented]))#4/17/2009#,(IIf([tbl_Demographics]![dtDateReConsented]
Is
Null,[tbl_Demographics]![dtDateFirstConsented],[tbl_Demographics]![dtDateReConsented]))+5*365,(IIf([tbl_Demographics]![dtDateReConsented]
Is
Null,[tbl_Demographics]![dtDateFirstConsented],[tbl_Demographics]![dtDateReConsented]))+10*365)

I originally had this in a query and it worked just fine there, but copying
the code to the form did not work. What is going on?

Thanks.

 




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 11:03 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.