is there another way to reference fields of the recordsource in vba?

  • Thread starter Thread starter Norman Fritag
  • Start date Start date
N

Norman Fritag

Hi there,

I like to reference fields from the query recordsource in a report. The only
way, I am aware of is, adding those fields to the report as a text control
and then reference them in vba.

Is there another way to reference fields directly from the query or table
recordsource?

kind regards

Norman
 
Hi there,

I like to reference fields from the query recordsource in a report. The only
way, I am aware of is, adding those fields to the report as a text control
and then reference them in vba.

Is there another way to reference fields directly from the query or table
recordsource?

kind regards

Norman

Have you tried DLookUp()?

Dim X as integer
X = DLookUp("[Fieldname]","Table/QueryName","[SomeField] = ?Criteria")
 
Norman said:
I like to reference fields from the query recordsource in a report. The only
way, I am aware of is, adding those fields to the report as a text control
and then reference them in vba.

Is there another way to reference fields directly from the query or table
recordsource?


Unlike forms, reports require you to use the field in a
control. Ordinarily, it's really not a big enough deal to
worry about, but if you have an unusual situation, you can
use an invisible text box with an expression that refers to
a whole bunch of fields (e.g. =f1 & f2 & . . .).
 
thanks

for the confirmation

Regards

Norman

Marshall Barton said:
Unlike forms, reports require you to use the field in a
control. Ordinarily, it's really not a big enough deal to
worry about, but if you have an unusual situation, you can
use an invisible text box with an expression that refers to
a whole bunch of fields (e.g. =f1 & f2 & . . .).
 
Back
Top