error when i try to print the two dates in my report

  • Thread starter Thread starter Eric
  • Start date Start date
E

Eric

It gives that error when i try to print the two dates in my report:
You cant assign value to this object

Private Sub Report_Open(Cancel As Integer)
Me.dt1 = Forms.JStatusFrm.Date1
Me.dt2 = Forms.JStatusFrm.Date2

End Sub

Thanks,
 
If the form remains open either do it in the Format event procedure of
whichever section the dt1 and dt2 controls are in or reference the form's
controls in the ControlSouce properties of the dt1 and dt2 controls. If the
form is being closed in the report's Open event procedure then, before
closing the form, assign the values of the form's controls to two variables
declared in the report's module's Declarations area and then assign the
values of the variables to the controls in the relevant section's Format
event procedure.

Ken Sheridan
Stafford, England
 

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

Back
Top