[AccessD] Referencing parent form from subform

John Clark John.Clark at niagaracounty.com
Thu Jan 30 13:39:14 CST 2014


In the OnEnter even of the subform, I've got the following code. It says, "Run-time error '2452': The expression you entered has an invalid reference to the Parent property.
 
I've always used this little chart...for years...and its never let me down. I HAVE read it improperly before though...
 
My chart says, if I am on Sub 1, and I want to refer to a control on the main form I use
 
datDoS.Value = Me.Parent!datFormDate 
 
(I also tried adding .Value at the end...just to be sure)
 
I miss easy things quite a bit, so I'm hoping this is the case, but...
 
I'm also trying to set an enabled property, and that ain't working either..."to access a control property LIKE ENABLED..." is says, "Me.Parent!ControlName.Enabled" 
 
I am doing this inside of a CASE statement, so it is...
 
Select Case Me.Parent!txtAgeYrs
 
    Case Is < 4
        txtSurv1A.Enabled = True ...not happening
 
I'm having a very bad week...thinking about hanging up the programming and driving a truck...or diggin' ditches...

Notice: This electronic transmission is intended for the sole use of the individual or entity to which it is addressed and may contain confidential, privileged or otherwise legally protected information. If you are not the intended recipient, or if you believe you are not the intended recipient, you are hereby notified that any use, disclosure, copying, distribution, or the taking of any action in reliance on the contents of this information, is strictly prohibited. Niagara County is not responsible for the content of any external hyperlink referenced in this email or any email. 
IF YOU HAVE RECEIVED THIS TRANSMISSION IN ERROR, PLEASE NOTIFY THE SENDER IMMEDIATELY BY EMAIL AND DELETE THE ORIGINAL MESSAGE ALONG WITH ANY PAPER OR ELECTRONIC COPIES. 
Thank you for your cooperation.


More information about the AccessD mailing list