Form Current code works but error message

C

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
 
R

RuralGuy

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
 

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