Report field populate

brsawvel

Registered User.
Local time
Today, 18:53
Joined
Sep 19, 2007
Messages
256
Easy question I can't find an answer to.

I know how to cause frmB.fldA to match frmA.fldA using the onopen cmd.

But how do I cause rptA.fldA to match frmA.fldA using the onopen cmd?

There doesn't seem to be a "Me.fldA.Value =" option.
 
You could simply point to the form control in the control source of the control on the report. To do it in code, the appropriate place would be the format event of the section containing the report control (Detail section, etc).
 
Actually it is the same for reports as it is for forms:

Code:
DoCmd.OpenReport "ReportNameHere", acViewPreview, , "[FldA]=" & Me.FldA

or if the field is text
Code:
DoCmd.OpenReport "ReportNameHere", acViewPreview, , "[FldA]=" & Chr(34) & Me.FldA & Chr(34)
 

Users who are viewing this thread

Back
Top Bottom