I have a Subform (called OrderDetails) on a Page Tab (called Orders) that links to the Customer, the relevant data in the subform changes as I click through the Customer records no problem, I also have a Button on the same Page Tab (called 'Link') to open another form. What I want is for the 'Link' button to be not visible of the 'Subform!OrderID' control is Null. I created a Macro and attached it to the OnCurrent property of the main form:
If IsNull([OrderDetails].Form![OrderID])
SetProperty
Link
Visible
No
End If
If Not IsNull([OrderDetails].Form![OrderID])
SetProperty
Link
Visible
Yes
There's something wrong as the button is always visible, can anyone tell me why? Do I have to refer to the Page Tab (Orders) as well as the Subform (OrderDetails) for instance? I've used the IsNull/Not IsNull and referred to Subforms before without any problems? If it has to be done in vb, then I do have a problem, as I simply can't get anything to work!