Re: Accessing multiple fields in report function
- From: "Allen Browne" <AllenBrowne@xxxxxxxxxxxxxx>
- Date: Tue, 17 Jan 2006 10:46:08 +0800
Dan, you will need to pass all the fields from the record to your function.
If the function is called CountTrue, and you need to pass 3 fields, you
would set the Control Source of your text box to:
=CountTrue([Field1], [Field2], [Field3])
If you need the function to accept an indeterminate number of fields, you
can declare its arguments as a ParamArray. There's an example of parsing and
operating on the array parameters here:
http://allenbrowne.com/func-09.html
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.
"Dan Dorrough" <ddorrough@xxxxxxxxxxx> wrote in message
news:SrXyf.100730$ME5.35671@xxxxxxxxxxxxxxxxxxxxxxx
>I need to be able to access multiple fields within a VBA function called
>for
> each record of a report (MSAccess 2000). For example, suppose I wanted to
> return a string containing the names of all of the boolean fields that are
> true for each record, how could I do it? Or suppose I simply wanted a
> count
> of all of the boolean fields that are true in each record, how could I do
> that?
.
- Follow-Ups:
- Re: Accessing multiple fields in report function
- From: Dan Dorrough
- Re: Accessing multiple fields in report function
- References:
- Accessing multiple fields in report function
- From: Dan Dorrough
- Accessing multiple fields in report function
- Prev by Date: Re: Type Library Reference Problem
- Next by Date: Re: Programs for OCR
- Previous by thread: Accessing multiple fields in report function
- Next by thread: Re: Accessing multiple fields in report function
- Index(es):
Relevant Pages
|