From: magmike on
This IIf statement is in an unbound control on a report. When I paste
it into the Control Source under the unbound control's properties - I
get an error saying the expression is too complicated. I've double
checked it, and it is crafted correctly. I'm guessing it is too long.
Is there a maximum amount of IIf checks?

Just a little background - There are 29 different possible fields from
a query that I might want to populate this control with, depending on
the value of another field. Unfortunately, I am stuck working with a
badly built database and trying to make this work in spite of it. So,
my control source answer is a 29 step IIf statement. Is there a work
around on this?

Thanks in advance for your help!

magmike
From: Douglas J. Steele on
Why not create a function and use that function as the ControlSource, rather
than trying to jam it all into a massive IIf statement?

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)



"magmike" <magmike7(a)yahoo.com> wrote in message
news:54ed10b5-5c4c-4fe9-bb4f-ac9a7f63db43(a)y17g2000yqd.googlegroups.com...
> This IIf statement is in an unbound control on a report. When I paste
> it into the Control Source under the unbound control's properties - I
> get an error saying the expression is too complicated. I've double
> checked it, and it is crafted correctly. I'm guessing it is too long.
> Is there a maximum amount of IIf checks?
>
> Just a little background - There are 29 different possible fields from
> a query that I might want to populate this control with, depending on
> the value of another field. Unfortunately, I am stuck working with a
> badly built database and trying to make this work in spite of it. So,
> my control source answer is a 29 step IIf statement. Is there a work
> around on this?
>
> Thanks in advance for your help!
>
> magmike

From: magmike on
On Mar 21, 6:10 am, "Douglas J. Steele"
<NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:
> Why not create a function and use that function as the ControlSource, rather
> than trying to jam it all into a massive IIf statement?
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)
>
> "magmike" <magmi...(a)yahoo.com> wrote in message
>
> news:54ed10b5-5c4c-4fe9-bb4f-ac9a7f63db43(a)y17g2000yqd.googlegroups.com...
>
>
>
> > This IIf statement is in an unbound control on a report. When I paste
> > it into the Control Source under the unbound control's properties - I
> > get an error saying the expression is too complicated. I've double
> > checked it, and it is crafted correctly. I'm guessing it is too long.
> > Is there a maximum amount of IIf checks?
>
> > Just a little background - There are 29 different possible fields from
> > a query that I might want to populate this control with, depending on
> > the value of another field. Unfortunately, I am stuck working with a
> > badly built database and trying to make this work in spite of it. So,
> > my control source answer is a 29 step IIf statement. Is there a work
> > around on this?
>
> > Thanks in advance for your help!
>
> >magmike

I didn't realize I could do a function in a report. How would I do
that?
From: Douglas J. Steele on
Reports can have modules associated with them, or you can create the
function in a stand-alone module.

--
Doug Steele, Microsoft Access MVP
http://www.AccessMVP.com/DJSteele
(no e-mails, please!)

"magmike" <magmike7(a)yahoo.com> wrote in message
news:ab669e02-69c9-4853-9149-9ad2d85e5e7a(a)k17g2000yqb.googlegroups.com...
On Mar 21, 6:10 am, "Douglas J. Steele"
<NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:
> Why not create a function and use that function as the ControlSource,
> rather
> than trying to jam it all into a massive IIf statement?
>
> --
> Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> (no e-mails, please!)
>
> "magmike" <magmi...(a)yahoo.com> wrote in message
>
> news:54ed10b5-5c4c-4fe9-bb4f-ac9a7f63db43(a)y17g2000yqd.googlegroups.com...
>
>
>
> > This IIf statement is in an unbound control on a report. When I paste
> > it into the Control Source under the unbound control's properties - I
> > get an error saying the expression is too complicated. I've double
> > checked it, and it is crafted correctly. I'm guessing it is too long.
> > Is there a maximum amount of IIf checks?
>
> > Just a little background - There are 29 different possible fields from
> > a query that I might want to populate this control with, depending on
> > the value of another field. Unfortunately, I am stuck working with a
> > badly built database and trying to make this work in spite of it. So,
> > my control source answer is a 29 step IIf statement. Is there a work
> > around on this?
>
> > Thanks in advance for your help!
>
> >magmike

I didn't realize I could do a function in a report. How would I do
that?


From: magmike on
On Mar 22, 5:12 am, "Douglas J. Steele"
<NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:
> Reports can have modules associated with them, or you can create the
> function in a stand-alone module.
>
> --
> Doug Steele, Microsoft Access MVPhttp://www.AccessMVP.com/DJSteele
> (no e-mails, please!)
>
> "magmike" <magmi...(a)yahoo.com> wrote in message
>
> news:ab669e02-69c9-4853-9149-9ad2d85e5e7a(a)k17g2000yqb.googlegroups.com...
> On Mar 21, 6:10 am, "Douglas J. Steele"
>
>
>
>
>
> <NOSPAM_djsteele(a)NOSPAM_gmail.com> wrote:
> > Why not create a function and use that function as the ControlSource,
> > rather
> > than trying to jam it all into a massive IIf statement?
>
> > --
> > Doug Steele, Microsoft Access MVPhttp://I.Am/DougSteele
> > (no e-mails, please!)
>
> > "magmike" <magmi...(a)yahoo.com> wrote in message
>
> >news:54ed10b5-5c4c-4fe9-bb4f-ac9a7f63db43(a)y17g2000yqd.googlegroups.com....
>
> > > This IIf statement is in an unbound control on a report. When I paste
> > > it into the Control Source under the unbound control's properties - I
> > > get an error saying the expression is too complicated. I've double
> > > checked it, and it is crafted correctly. I'm guessing it is too long.
> > > Is there a maximum amount of IIf checks?
>
> > > Just a little background - There are 29 different possible fields from
> > > a query that I might want to populate this control with, depending on
> > > the value of another field. Unfortunately, I am stuck working with a
> > > badly built database and trying to make this work in spite of it. So,
> > > my control source answer is a 29 step IIf statement. Is there a work
> > > around on this?
>
> > > Thanks in advance for your help!
>
> > >magmike
>
> I didn't realize I could do a function in a report. How would I do
> that?

How would I reference the function in the Control Source?
 |  Next  |  Last
Pages: 1 2 3 4 5
Prev: Access sub form help neededSG 1400
Next: .dat file