Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making Subform visible 1

Status
Not open for further replies.

Dibblet

Technical User
Jul 14, 2005
20
GB
I have a form containing a subform. The for is called 'purchasedetailsB' and the subform 'meshpurchaseSF'.

I would like to make the subform visible or invisible depending on what a combo box displays.

I have set up an if function on the combo box, but when I run it I get and error message saying that 'Enquiry/order system cannot find the field referred to in your expression'

The code reads:

If Forms!Purchasedetailsb!Combo93 <> "repair"
And Forms!Purchasedetailsb!Combo93 <> "tooling"
And Forms!Purchasedetailsb!Combo93 <> "filter"
And Forms!Purchasedetailsb!Combo93 <> "other"
And Forms!Purchasedetailsb!Combo93 <> "wedge wire" Then

Forms![Purchasedetailsb]![PurchaseMeshSF].Visible = False
Else
End If

Can someone point me in the right direction please?
 
Perhaps this ?
Forms![Purchasedetailsb]![MeshPurchaseSF].Visible = False

You may play with the expression builder (loaded forms) to discover the right syntax.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Tried playing with the expression builder turns out I was using a wrong subform name and a different command line.

I ended up with-

[PurchaseMesh subform1].Form.Visible = True

Thanks
PHV
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top