setting report field equal to form field

T

T Best

Hi all,

Is it possible to set a field in a report to a field on an open form thru
code? For example...I have a report and i set the On Open Event Procedure as
follows:

Private Sub Report_Open(Cancel As Integer)

txtPolNumber = [Forms]![frmMain_CommPkg]![txtPolNumber]

End Sub

when i open the report i get the following error: Run-time error '2448': You
can't assign a value to this object.

if i set the value of txtPolNumber in design view to
"=[Forms]![frmMain_CommPkg]![txtPolNumber]" it works.

Any help would be very appreciated!
TIA
Ted
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top