This is driving me to despair. I've read so many MS Access sites trying to solve what appears to be a common difficulty in setting the property of a control on a sub-form using WIN7/Access 2013 (not a web-based site)
Main Form is [fmDeliveryNote] and Sub-form is [fmDeliveryDetails] and there is a control on the sub-form [UnitPrice]. I need to construct Macros on the main form that will make [UnitPrice] on the sub-form Visible or Not Visible. As I do not do a lot of
database construction I only have a moderate ability at Macro level and not VB.
According to all advice the SETPROPERTY settings should be-
Control Name [fmDeliveryDetails].Form![UnitPrice]
Property [Visible]
Value [False] or [True]
This gets met with a "Control misspelled or doesn't exit error message". I have tried every possible permutation with/without the Forms! identifier bangs(!) and/or periods (.) and all sorts of full or partial syntax. I have checked that I am using the
correct sub-form control name. If I drop the [UnitPrice] bit then the macro does make the whole sub-form invisible/visible so at least the sub-form is recognised but the [UnitPrice} suffix is causing the problem.
Using the SETVALUE property instead of SETPROPERTY and using ITEM=[fmDliveryDetails![UnitPrice] EXPRESSION [Visible=False] actually does recognise the control BUT only turns the first instance of [UnitPrice] from a previous value into a Zero.
I know this question has been asked many times but it seems to cause a lot of problems.