E
Erik Johnson
Greetings,
I am new to the MS Access product, but have experience writing DB
middle ware in other environments.
Right now my challenge is this: I want to write an expression in a
report control that is a complex expression of the record fields. I
see how to directly write an expression referring to the record fields
like [Customer Name] and so on, and I also see how to make a function
call passing one or more fields as function arguments as above, but
what I really want to do is pass a reference to the current record,
and then within my function be able to refer to all the different
fields of that record.
I'm thinking there's probably some very simple way to do this, but
it's syntax is not guessable to me and I'm not having much luck with
Microsoft "Help".
For example, in the 'Detail' section of my report, what I want to
print is:
=CategoryA([record])
Then in my Module, I want to define a function something like this:
Function CategoryA(rec)
CategoryA = rec.speed + rec.weight ' + ... some nasty formula
involving many record fields
End Function
What is the syntax to pass the current record as a whole and then to
refer to it's fields?
Thanks for any help you can provide!
-ej
I am new to the MS Access product, but have experience writing DB
middle ware in other environments.
Right now my challenge is this: I want to write an expression in a
report control that is a complex expression of the record fields. I
see how to directly write an expression referring to the record fields
like [Customer Name] and so on, and I also see how to make a function
call passing one or more fields as function arguments as above, but
what I really want to do is pass a reference to the current record,
and then within my function be able to refer to all the different
fields of that record.
I'm thinking there's probably some very simple way to do this, but
it's syntax is not guessable to me and I'm not having much luck with
Microsoft "Help".
For example, in the 'Detail' section of my report, what I want to
print is:
=CategoryA([record])
Then in my Module, I want to define a function something like this:
Function CategoryA(rec)
CategoryA = rec.speed + rec.weight ' + ... some nasty formula
involving many record fields
End Function
What is the syntax to pass the current record as a whole and then to
refer to it's fields?
Thanks for any help you can provide!
-ej