Jumat, 03 Agustus 2012

[MS_AccessPros] Re: Expression Builder Frustrations with IIF statement

 

It sounds like your AutoCorrect Name tracker is turned on. turn it off so you have more control over what't going on.

In 2003, go to Tools>Options>General tab. Uncheck the Auto Name correct feature.

In 2007, click the Office button in upper left corner. Click Access Options. I think it is under Current Database.

In 2010, File>Options>Current Database. It's near the botton of that screen.

Now name your text box something like txtCorrectiveActionTaken. That will stop any cicular reference. Then put in your IIF statement.

Let us know if that fixes it. I'm going off-line for the day but will check tomorrow in case you are still stranded with this pain.

Bill

--- In MS_Access_Professionals@yahoogroups.com, "Rohn" <reverson@...> wrote:
>
> Yes Bill. I selected the Field for the expression from the Expression Categories list within the Builder which is the exact name even at the table level.
>
> Actually it mimics what ever name I put in the Property Sheet Name field for the Text Box. So is that my problem!
>
> Rohn
>
> --- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@> wrote:
> >
> > Rohn
> >
> > CorrectiveActionTaken is a field in the form's record source, right? It has to be included even if you don't use it directly on the form.
> >
> > And you spelled it exactly like it is in the table, right? Check the table in design view to make sure. The query might be showing the display name if that field has one.
> >
> > Bill
> >
> > --- In MS_Access_Professionals@yahoogroups.com, "Rohn" <reverson@> wrote:
> > >
> > > Thanks for the reply Bill,
> > >
> > > Control name is Corrective Action Taken. I used the:
> > > =IIf(Len([CorrectiveActionTaken]& "")<>0,"X","Not Complete")
> > >
> > > but I still get the #Type! error? Could I have somethings else wrong?
> > >
> > > Thanks again, Rohn
> > >
> > > --- In MS_Access_Professionals@yahoogroups.com, "Bill Mosca" <wrmosca@> wrote:
> > > >
> > > > Rohn
> > > >
> > > > First, make sure the control name is not CorrectiveActionTaken as that would cause a circular reference.
> > > >
> > > > Next, CorrectiveActionTaken could be null so check for that as well.
> > > >
> > > > =IIf(Len([CorrectiveActionTaken]& "")<>0,"X","Not Complete")
> > > >
> > > > Regards,
> > > > Bill Mosca, Founder - MS_Access_Professionals
> > > > http://www.thatlldoit.com
> > > > Microsoft Office Access MVP
> > > > https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
> > > > My nothing-to-do-with-Access blog
> > > > http://wrmosca.wordpress.com
> > > >
> > > >
> > > >
> > > > --- In MS_Access_Professionals@yahoogroups.com, "Rohn" <reverson@> wrote:
> > > > >
> > > > > Thanks in advance!
> > > > >
> > > > > On an existing report. I would like to add an identifier, instead of picking the Field from the Control Source I want to add an expression if the field has data; place an X on the report or if field is blank/null place a statement "Not Complete".
> > > > >
> > > > > I have tried: =IIf(([CorrectiveActionTaken]=""),"X","Not Complete") but each variation I attempt I get #Type! or #Name or some other error. Do you know what I am doing wrong??
> > > > >
> > > > > I am using Access 2010.
> > > > >
> > > > > Thank you, Rohn
> > > > >
> > > >
> > >
> >
>

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar