Form Current code works but error message

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,
Thanks to all the folks on the forum who assisted me with this code, as well
as previous brain teasers. I couldn't have gotten this far without you.

I have MainForm; SubForm1; SubForm2

In the Current event of SubForm1, I have the following code:

'The following statement prevents users from entering hours on a task that
is complete
If chkboxComplete = True Then
Parent.SubForm2.Form.AllowAdditions = False
Else

Parent.SubForm2.Form.AllowAdditions = True
End If

It works but I get the message: "Invalid reference to property form/report."

Additionally, when I use the Record Selector at the bottom of the form to go
from first to last record, the form blinks and it takes time to cycle to the
end.

Thanks again for all the help.
Captain OhNo
 
Hi,
Thanks to all the folks on the forum who assisted me with this code,
as well as previous brain teasers. I couldn't have gotten this far
without you.

I have MainForm; SubForm1; SubForm2

In the Current event of SubForm1, I have the following code:

'The following statement prevents users from entering hours on a task
that is complete
If chkboxComplete = True Then
Parent.SubForm2.Form.AllowAdditions = False
Else

Parent.SubForm2.Form.AllowAdditions = True
End If

It works but I get the message: "Invalid reference to property
form/report."

Additionally, when I use the Record Selector at the bottom of the form
to go from first to last record, the form blinks and it takes time to
cycle to the end.

Thanks again for all the help.
Captain OhNo

I would think you would need to preceed the lines with the
Me operator ie:

Me.Parent.SubForm2.Form.AllowAdditions = False

HTH
 
Back
Top